Skip to content

Commit

Permalink
Fixed Docker image compilation when a pull request is merged
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Aug 2, 2024
1 parent 428e875 commit 063f900
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ jobs:
tags: |
type=sha
- name: Login to GitHub Container Registry
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.merged )
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image and push
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.merged )
uses: docker/build-push-action@v6
with:
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .

0 comments on commit 063f900

Please sign in to comment.