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:
|
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: 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 +26,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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user