Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
fix Build tag not being set correctly for deployments from prs (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler authored Sep 23, 2024
1 parent 6681a3c commit 402ac9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- name: Get the SHA of the current branch/fork
shell: bash
run: |
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
if: steps.trigger-deployment.outputs.triggered == 'true'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -56,7 +60,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILD_TAG=${{ github.sha }}
BUILD_TAG=${{ env.SHORT_SHA }}
- name: Build and push worker Image
if: steps.trigger-deployment.outputs.triggered == 'true'
uses: docker/build-push-action@v6
Expand All @@ -69,7 +73,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILD_TAG=${{ github.sha }}
BUILD_TAG=${{ env.SHORT_SHA }}
- name: Deploy if triggered
if: steps.trigger-deployment.outputs.triggered == 'true'
env:
Expand Down

0 comments on commit 402ac9e

Please sign in to comment.