fixup! fixup! Build Docker image with Kaniko
Build and publish Docker image / build (push) Successful in 25s Details

This commit is contained in:
TheAssassin 2024-06-01 17:26:26 +02:00
parent 9a091c0907
commit 880117136b
1 changed files with 10 additions and 2 deletions

View File

@ -20,12 +20,20 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Extract metadata (tags, labels) for Docker - name: Generate suitable tag for kaniko
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Extract tag for kaniko action
id: tag
env:
TAG: ${{ steps.meta.outputs.tags[0] }}
run: |
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:
@ -33,7 +41,7 @@ jobs:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
tag: ${{ steps.meta.outputs.tags }} 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: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}