Updated task, gitea workflow
This commit is contained in:
parent
6a2eb164cf
commit
49ec1fa31a
28
.gitea/workflows/push.yml
Normal file
28
.gitea/workflows/push.yml
Normal file
@ -0,0 +1,28 @@
|
||||
name: Build and push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [amd64, prod]
|
||||
container:
|
||||
image:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Login into registry
|
||||
envs:
|
||||
REGISTRY: harbor.rosti.cz
|
||||
USERNAME: robot_lib
|
||||
PASSWORD:
|
||||
from_secret: REGISTRY_TOKEN
|
||||
run: |
|
||||
docker login -u $USERNAME -p "$PASSWORD" $REGISTRY
|
||||
- name: Build
|
||||
run: |
|
||||
task build
|
||||
- name: Push
|
||||
run: |
|
||||
task push
|
@ -7,5 +7,5 @@ RUN dnf -y upgrade --refresh
|
||||
RUN dnf -y install python3.9 python3.10 python3-pip pipenv fish helm awscli ansible podman podman-docker git git-lfs jq make openssh nodejs npm golang sqlite rsync wget
|
||||
# kubectl terraform
|
||||
RUN dnf -y groupinstall "Development Tools"
|
||||
RUN wget https://github.com/go-task/task/releases/download/v3.28.0/task_linux_amd64.rpm && dnf localinstall -y task_linux_amd64.rpm && rm task_linux_amd64.rpm
|
||||
RUN wget https://github.com/go-task/task/releases/download/v3.30.1/task_linux_amd64.rpm && dnf localinstall -y task_linux_amd64.rpm && rm task_linux_amd64.rpm
|
||||
RUN update-ca-trust
|
||||
|
@ -3,8 +3,9 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
REPO: registry.kube.ceperka.net/library/builder:38
|
||||
VERSION: 38
|
||||
REGISTRY: harbor.rosti.cz
|
||||
REPO: library/builder
|
||||
VERSION: 38-1
|
||||
|
||||
tasks:
|
||||
default:
|
||||
@ -13,11 +14,11 @@ tasks:
|
||||
|
||||
build:
|
||||
cmds:
|
||||
- docker build -t {{.REPO}}:{{.VERSION}} .
|
||||
- docker build -t {{ .REGISTRY }}/{{ .REPO }}:{{ .VERSION }} .
|
||||
|
||||
push:
|
||||
cmds:
|
||||
- docker push {{.REPO}}:{{.VERSION}}
|
||||
- docker push {{ .REGISTRY }}/{{ .REPO }}:{{ .VERSION }}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user