Files
url-shortener/.gitea/workflows/dockerimage.yaml
Gabriel Radureau c1d27971f7
All checks were successful
Docker Build / pull-and-push-image (push) Successful in 16s
replace duckdns.org with internal .lab - will use .fr later
2026-01-01 08:47:57 +01:00

39 lines
1.3 KiB
YAML

---
# template source: https://github.com/bretfisher/docker-build-workflow/blob/main/templates/call-docker-build.yaml
name: Docker Build
on:
workflow_dispatch: {}
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'argocd/**'
# cancel any previously-started, yet still active runs of this workflow on the same branch
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
pull-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: gitea.arcodange.lab
username: ${{ github.actor }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Push public image to Gitea Container Registry
run: |-
CURRENT_VERSION=`wget https://raw.githubusercontent.com/SinTan1729/chhoto-url/main/actix/Cargo.toml -qO- | grep '^version = "' | sed 's/[^\.0-9]//g'`
TAGS="latest $CURRENT_VERSION"
for TAG in $TAGS; do
docker pull sintan1729/chhoto-url:$TAG --platform arm64
docker tag sintan1729/chhoto-url:$TAG gitea.arcodange.lab/${{ github.repository }}:$TAG
docker push gitea.arcodange.lab/${{ github.repository }}:$TAG
done