diff --git a/.gitea/workflows/push.yml b/.gitea/workflows/push.yml new file mode 100644 index 0000000..c24c525 --- /dev/null +++ b/.gitea/workflows/push.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index bd46903..d3762c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Taskfile.yml b/Taskfile.yml index 6decfea..3edfc58 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -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 }}