Skip to content

Commit

Permalink
ci: Update GitHub Actions workflow to use github.event_name for build…
Browse files Browse the repository at this point in the history
… conditions
  • Loading branch information
paul-gauthier committed Jan 16, 2025
1 parent d62c43b commit c912b66
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build Docker images (PR)
if: ${{ secrets.DOCKERHUB_USERNAME == '' }}
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -53,7 +53,7 @@ jobs:
target: aider

- name: Build Docker images (Push)
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -64,7 +64,7 @@ jobs:
target: aider

- name: Build Docker full image (PR)
if: ${{ secrets.DOCKERHUB_USERNAME == '' }}
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -74,7 +74,7 @@ jobs:
target: aider-full

- name: Build Docker full image (Push)
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
Expand Down

0 comments on commit c912b66

Please sign in to comment.