Skip to content

Commit

Permalink
add better tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Utesgui committed Jan 21, 2024
1 parent faf9dae commit 9949493
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Add tags based on branch name
- name: Add tags based on branch name
id: add-tags
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "::set-output name=tags::latest"
elif [[ "${{ github.ref }}" == "refs/heads/beta" ]]; then
echo "::set-output name=tags::beta"
else
echo "::set-output name=tags::bleeding"
fi
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
Expand All @@ -79,7 +91,7 @@ jobs:
file: ./docker/matrix-b0t.Dockerfile
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}, ${{ steps.add-tags.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down

0 comments on commit 9949493

Please sign in to comment.