Updated task, gitea workflow
continuous-integration/drone/push Build encountered an error Details
Build and push / build (push) Has been cancelled Details

This commit is contained in:
Adam Štrauch 2023-09-19 13:11:21 +02:00
parent 6a2eb164cf
commit 49ec1fa31a
Signed by: cx
GPG Key ID: 7262DAFE292BCE20
3 changed files with 34 additions and 5 deletions

28
.gitea/workflows/push.yml Normal file
View 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

View File

@ -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

View File

@ -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 }}