use short sha as container name, also push latest
All checks were successful
arche-build-and-publish / gractwo-arche-build-test (push) Successful in 13s

This commit is contained in:
2026-03-29 22:26:15 +02:00
parent 8d9473dea1
commit d62734bf30

View File

@@ -11,11 +11,15 @@ jobs:
steps: steps:
- name: checkout repo - name: checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: set short sha
run: echo "short_sha=$(echo ${{gitea.sha}} | cut -c1-12)" >> $GITEA_ENV
- name: check short sha
run: echo "${{ env.short_sha }}"
- name: build image - name: build image
run: | run: |
docker buildx build --platform linux/amd64 \ docker buildx build --platform linux/amd64 \
-t git.gractwo.pl/gractwo/arche:latest \ -t git.gractwo.pl/gractwo/arche:latest \
-t git.gractwo.pl/gractwo/arche:${{gitea.sha}} \ -t git.gractwo.pl/gractwo/arche:${{env.short_sha}} \
. .
- name: log into package registry - name: log into package registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@@ -24,7 +28,9 @@ jobs:
username: ${{ gitea.actor }} username: ${{ gitea.actor }}
password: ${{ secrets.TOKEN2 }} password: ${{ secrets.TOKEN2 }}
- name: publish - name: publish
run: docker push git.gractwo.pl/gractwo/arche:${{gitea.sha}} run: |
docker push git.gractwo.pl/gractwo/arche:latest
docker push git.gractwo.pl/gractwo/arche:${{env.short_sha}}
- uses: actions-hub/kubectl@master - uses: actions-hub/kubectl@master
env: env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}