Skip to content

Commit

Permalink
Only pushing if merge on main
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Jul 3, 2024
1 parent f95d249 commit f50633e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ jobs:
build-docker:
name: Build D-Voting Docker images
runs-on: ubuntu-22.04
env:
push: false
if: '! github.event.pull_request.draft'
env:
DockerTag: ${{ (github.ref == 'refs/heads/main') && 'latest' || github.head_ref }}
push: true

steps:
- name: Checkout
Expand All @@ -26,6 +29,7 @@ jobs:
echo "REACT_APP_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "REACT_APP_BUILD=$(git describe --tags)" >> $GITHUB_ENV
echo "REACT_APP_BUILD_TIME=$(date)" >> $GITHUB_ENV
echo Pushing is ${{ env.push }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
Expand Down

0 comments on commit f50633e

Please sign in to comment.