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

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 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 # kubectl terraform
RUN dnf -y groupinstall "Development Tools" 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 RUN update-ca-trust

View File

@ -3,8 +3,9 @@
version: '3' version: '3'
vars: vars:
REPO: registry.kube.ceperka.net/library/builder:38 REGISTRY: harbor.rosti.cz
VERSION: 38 REPO: library/builder
VERSION: 38-1
tasks: tasks:
default: default:
@ -13,11 +14,11 @@ tasks:
build: build:
cmds: cmds:
- docker build -t {{.REPO}}:{{.VERSION}} . - docker build -t {{ .REGISTRY }}/{{ .REPO }}:{{ .VERSION }} .
push: push:
cmds: cmds:
- docker push {{.REPO}}:{{.VERSION}} - docker push {{ .REGISTRY }}/{{ .REPO }}:{{ .VERSION }}