[c] update tag refs to work properly
Some checks failed
Build and push docker image / deploy (push) Failing after 46s
Some checks failed
Build and push docker image / deploy (push) Failing after 46s
This commit is contained in:
parent
309e066319
commit
e2b394a6eb
1 changed files with 6 additions and 4 deletions
|
@ -30,16 +30,18 @@ jobs:
|
|||
|
||||
- name: 🐋 Build Container
|
||||
run: |
|
||||
# extract tag name without the prefix
|
||||
TAG=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///')
|
||||
# build the container
|
||||
just -f /workspace/sangelo/website/Justfile build ${{ github.ref }}
|
||||
just -f /workspace/sangelo/website/Justfile build "${TAG}"
|
||||
|
||||
- name: 🐳 Publish Container
|
||||
run: |
|
||||
echo "${{ secrets.PUBLISH_TOKEN }}" | docker login gitpot.dev -u sangelo --password-stdin
|
||||
docker push gitpot.dev/sangelo/website:${{ github.ref }}
|
||||
docker push "gitpot.dev/sangelo/website:${TAG}"
|
||||
|
||||
# publish tag latest as well
|
||||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||
docker tag gitpot.dev/sangelo/website:${{ github.ref }} gitpot.dev/sangelo/website:latest
|
||||
docker push gitpot.dev/sangelo/website:latest
|
||||
docker tag "gitpot.dev/sangelo/website:${TAG}" "gitpot.dev/sangelo/website:latest"
|
||||
docker push "gitpot.dev/sangelo/website:latest"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue