Browse Source

ci(docker): build images on pull requests without publishing

The vars.PUBLISH_DOCKER_IMAGES gate was redundant with the existing
repository_owner check and the push condition on the build steps, so
it has been removed.
Frédéric Guillot 4 days ago
parent
commit
8bbd60dac0
1 changed files with 3 additions and 5 deletions
  1. 3 5
      .github/workflows/docker.yml

+ 3 - 5
.github/workflows/docker.yml

@@ -58,14 +58,14 @@ jobs:
         uses: docker/setup-buildx-action@v4
 
       - name: Login to DockerHub
-        if: ${{ github.event_name != 'pull_request' && vars.PUBLISH_DOCKER_IMAGES == 'true' }}
+        if: ${{ github.event_name != 'pull_request' }}
         uses: docker/login-action@v4
         with:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
 
       - name: Login to GitHub Container Registry
-        if: ${{ github.event_name != 'pull_request' && vars.PUBLISH_DOCKER_IMAGES == 'true' }}
+        if: ${{ github.event_name != 'pull_request' }}
         uses: docker/login-action@v4
         with:
           registry: ghcr.io
@@ -73,7 +73,7 @@ jobs:
           password: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Login to Quay Container Registry
-        if: ${{ github.event_name != 'pull_request' && vars.PUBLISH_DOCKER_IMAGES == 'true' }}
+        if: ${{ github.event_name != 'pull_request' }}
         uses: docker/login-action@v4
         with:
           registry: quay.io
@@ -82,7 +82,6 @@ jobs:
 
       - name: Build and Push Alpine images
         uses: docker/build-push-action@v7
-        if: ${{ vars.PUBLISH_DOCKER_IMAGES == 'true' }}
         with:
           context: .
           file: ./packaging/docker/alpine/Dockerfile
@@ -92,7 +91,6 @@ jobs:
 
       - name: Build and Push Distroless images
         uses: docker/build-push-action@v7
-        if: ${{ vars.PUBLISH_DOCKER_IMAGES == 'true' }}
         with:
           context: .
           file: ./packaging/docker/distroless/Dockerfile