Compare commits

..

2 Commits

Author SHA1 Message Date
TheAssassin d88e3ba69d Fix parsing of Docker tag
Build and publish Docker image / build (push) Successful in 28s Details
2024-06-01 17:52:28 +02:00
TheAssassin 61c53a862b Don't hardcode default branch 2024-06-01 17:52:28 +02:00
1 changed files with 4 additions and 4 deletions

View File

@ -29,11 +29,11 @@ jobs:
- name: Extract tag for kaniko action - name: Extract tag for kaniko action
id: tag id: tag
env: env:
TAG: ${{ steps.meta.outputs.tags[0] }} TAG: ${{ steps.meta.outputs.tags }}
run: | run: |
echo "TAG=$TAG"
echo "::set-output name=tag::${TAG##*:}" echo "::set-output name=tag::${TAG##*:}"
- name: Build Docker image with kaniko - name: Build Docker image with kaniko
uses: https://code.thetadev.de/ThetaDev/action-kaniko@dbb8da86cf2d498dde8ec1b3be967ceda17a21ff uses: https://code.thetadev.de/ThetaDev/action-kaniko@dbb8da86cf2d498dde8ec1b3be967ceda17a21ff
with: with:
@ -43,10 +43,10 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
tag: ${{ steps.tag.outputs.tag }} tag: ${{ steps.tag.outputs.tag }}
platforms: linux/amd64 platforms: linux/amd64
tag_with_latest: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} tag_with_latest: ${{ gitea.ref == format('refs/heads/{0}', gitea.event.repository.default_branch) }}
- name: Trigger redeployment - name: Trigger redeployment
if: gitea.ref == 'refs/heads/main' if: gitea.ref == format('refs/heads/{0}', gitea.event.repository.default_branch)
env: env:
UPDATE_URL: ${{ secrets.UPDATE_URL }} UPDATE_URL: ${{ secrets.UPDATE_URL }}
UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }} UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }}