CI: :latest-Tag nur auf main veröffentlichen verhindert Nightly-Label auf latest Deployments
This commit is contained in:
parent
8662a5fbc0
commit
55a0c0d65e
1 changed files with 18 additions and 1 deletions
19
.github/workflows/docker-build.yml
vendored
19
.github/workflows/docker-build.yml
vendored
|
|
@ -39,7 +39,9 @@ jobs:
|
|||
echo "channel=nightly" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Build and push
|
||||
# Nur auf main: auch :latest tag pushen
|
||||
- name: Build and push (main)
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
|
|
@ -52,3 +54,18 @@ jobs:
|
|||
${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
${{ env.IMAGE_NAME }}:${{ steps.docker_tag.outputs.tag }}
|
||||
platforms: linux/amd64
|
||||
|
||||
# Feature-/Nightly-Branches: kein :latest Tag
|
||||
- name: Build and push (feature branches)
|
||||
if: ${{ github.ref_name != 'main' }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
build-args: |
|
||||
VITE_BUILD_CHANNEL=${{ steps.docker_tag.outputs.channel }}
|
||||
VITE_APP_VERSION=${{ steps.docker_tag.outputs.version }}
|
||||
tags: |
|
||||
${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
${{ env.IMAGE_NAME }}:${{ steps.docker_tag.outputs.tag }}
|
||||
platforms: linux/amd64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue