use short sha as container name, also push latest
All checks were successful
arche-build-and-publish / gractwo-arche-build-test (push) Successful in 9s
All checks were successful
arche-build-and-publish / gractwo-arche-build-test (push) Successful in 9s
This commit is contained in:
@@ -11,11 +11,13 @@ jobs:
|
||||
steps:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: set short sha
|
||||
run: echo "short_sha=$(echo ${{gitea.sha}} | cut -c1-12)" >> $GITEA_ENV
|
||||
- name: build image
|
||||
run: |
|
||||
docker buildx build --platform linux/amd64 \
|
||||
-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
|
||||
uses: docker/login-action@v3
|
||||
@@ -24,7 +26,9 @@ jobs:
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.TOKEN2 }}
|
||||
- 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
|
||||
env:
|
||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||
|
||||
Reference in New Issue
Block a user