ci: tag with branch name if not default branch

This should prevent failed runs like https://github.com/NodeBB/NodeBB/actions/runs/4959641483
This commit is contained in:
Opliko
2023-05-12 17:48:46 +02:00
committed by Julian Lam
parent 5b3987828b
commit cd7fdfcefd

View File

@@ -47,6 +47,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.x type=semver,pattern={{major}}.x
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch,enable={{#if is_default_branch}}false{{else}}true{{/if}}
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4