Skip to content

Commit 10ce315

Browse files
committed
Adds push step for main branch only
1 parent 97e6c30 commit 10ce315

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ jobs:
8888
password: ${{ secrets.DOCKERHUB_TOKEN }}
8989

9090
# Never use cache with builds, build from scratch for security updates
91-
92-
- name: Build and push Docker images
91+
- name: Build Docker images
9392
uses: docker/build-push-action@v2
94-
# if: ${{ github.ref == 'refs/heads/main' }}
9593
if: ${{ github.ref == 'refs/heads/feature/automated-tests' }}
9694
with:
9795
push: false # set to false for testing
@@ -100,3 +98,10 @@ jobs:
10098
build-args: |
10199
PHP_IMG=${{ matrix.base_container }}
102100
COMPOSER_VERSION=${{ env.COMPOSER_VERSION }}
101+
102+
- name: Push Docker images
103+
uses: docker/build-push-action@v2
104+
if: ${{ github.ref == 'refs/heads/main' }}
105+
with:
106+
push: true
107+
tags: ${{ env.BUILD_TAGS }}

0 commit comments

Comments
 (0)