Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 0d8340b

Browse files
authored
Merge pull request #19 from cedric-anne/task/check-build-on-pr
Validate images build without pushing on PR
2 parents 959a13f + 89ecd26 commit 0d8340b

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

.github/workflows/php74.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77
paths:
8+
- .github/workflows/php74.yml
9+
- '7.4-dev/**'
10+
pull_request:
11+
paths:
12+
- .github/workflows/php74.yml
813
- '7.4-dev/**'
914
schedule:
1015
- cron: '0 0 1,15 * *'
@@ -29,6 +34,7 @@ jobs:
2934
with:
3035
username: ${{ secrets.DOCKERHUB_USERNAME }}
3136
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
if: github.event_name != 'pull_request'
3238
- run: |
3339
echo "tag_generic_version=phpdaily/php:7.4" >> $GITHUB_ENV
3440
echo "tag_short_platform=phpdaily/php:7.4-alpine" >> $GITHUB_ENV
@@ -40,7 +46,7 @@ jobs:
4046
with:
4147
context: 7.4-dev/${{ matrix.alpine }}/${{ matrix.sapi }}
4248
no-cache: true
43-
push: true
49+
push: ${{ github.event_name != 'pull_request' }}
4450
tags: |
4551
phpdaily/php:7.4-${{ matrix.sapi }}-${{ matrix.alpine }}
4652
${{ env.tag_generic_version }}
@@ -66,14 +72,15 @@ jobs:
6672
with:
6773
username: ${{ secrets.DOCKERHUB_USERNAME }}
6874
password: ${{ secrets.DOCKERHUB_TOKEN }}
75+
if: github.event_name != 'pull_request'
6976
- run: echo "tag_generic_platform=phpdaily/php:7.4-${{ matrix.ubuntu }}" >> $GITHUB_ENV
7077
if: ${{ matrix.sapi == 'cli' }}
7178
- name: Build
7279
uses: docker/build-push-action@v2
7380
with:
7481
context: 7.4-dev/${{ matrix.ubuntu }}/${{ matrix.sapi }}
7582
no-cache: true
76-
push: true
83+
push: ${{ github.event_name != 'pull_request' }}
7784
tags: |
7885
phpdaily/php:7.4-${{ matrix.sapi }}-${{ matrix.ubuntu }}
7986
${{ env.tag_generic_platform }}

.github/workflows/php80.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77
paths:
8+
- .github/workflows/php80.yml
9+
- '8.0-dev/**'
10+
pull_request:
11+
paths:
12+
- .github/workflows/php80.yml
813
- '8.0-dev/**'
914
schedule:
1015
- cron: '0 0 * * *'
@@ -29,6 +34,7 @@ jobs:
2934
with:
3035
username: ${{ secrets.DOCKERHUB_USERNAME }}
3136
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
if: github.event_name != 'pull_request'
3238
- run: |
3339
echo "tag_generic_version=phpdaily/php:8.0" >> $GITHUB_ENV
3440
echo "tag_short_platform=phpdaily/php:8.0-alpine" >> $GITHUB_ENV
@@ -40,7 +46,7 @@ jobs:
4046
with:
4147
context: 8.0-dev/${{ matrix.alpine }}/${{ matrix.sapi }}
4248
no-cache: true
43-
push: true
49+
push: ${{ github.event_name != 'pull_request' }}
4450
tags: |
4551
phpdaily/php:8.0-${{ matrix.sapi }}-${{ matrix.alpine }}
4652
${{ env.tag_generic_version }}
@@ -66,14 +72,15 @@ jobs:
6672
with:
6773
username: ${{ secrets.DOCKERHUB_USERNAME }}
6874
password: ${{ secrets.DOCKERHUB_TOKEN }}
75+
if: github.event_name != 'pull_request'
6976
- run: echo "tag_generic_platform=phpdaily/php:8.0-${{ matrix.ubuntu }}" >> $GITHUB_ENV
7077
if: ${{ matrix.sapi == 'cli' }}
7178
- name: Build
7279
uses: docker/build-push-action@v2
7380
with:
7481
context: 8.0-dev/${{ matrix.ubuntu }}/${{ matrix.sapi }}
7582
no-cache: true
76-
push: true
83+
push: ${{ github.event_name != 'pull_request' }}
7784
tags: |
7885
phpdaily/php:8.0-${{ matrix.sapi }}-${{ matrix.ubuntu }}
7986
${{ env.tag_generic_platform }}

.github/workflows/php81.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77
paths:
8+
- .github/workflows/php81.yml
9+
- '8.1-dev/**'
10+
pull_request:
11+
paths:
12+
- .github/workflows/php81.yml
813
- '8.1-dev/**'
914
schedule:
1015
- cron: '0 0 * * *'
@@ -29,6 +34,7 @@ jobs:
2934
with:
3035
username: ${{ secrets.DOCKERHUB_USERNAME }}
3136
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
if: github.event_name != 'pull_request'
3238
- run: |
3339
echo "tag_latest=phpdaily/php:latest" >> $GITHUB_ENV
3440
echo "tag_generic_version=phpdaily/php:8.1" >> $GITHUB_ENV
@@ -41,7 +47,7 @@ jobs:
4147
with:
4248
context: 8.1-dev/${{ matrix.alpine }}/${{ matrix.sapi }}
4349
no-cache: true
44-
push: true
50+
push: ${{ github.event_name != 'pull_request' }}
4551
tags: |
4652
phpdaily/php:8.1-${{ matrix.sapi }}-${{ matrix.alpine }}
4753
${{ env.tag_latest }}
@@ -68,14 +74,15 @@ jobs:
6874
with:
6975
username: ${{ secrets.DOCKERHUB_USERNAME }}
7076
password: ${{ secrets.DOCKERHUB_TOKEN }}
77+
if: github.event_name != 'pull_request'
7178
- run: echo "tag_generic_platform=phpdaily/php:8.1-${{ matrix.ubuntu }}" >> $GITHUB_ENV
7279
if: ${{ matrix.sapi == 'cli' }}
7380
- name: Build
7481
uses: docker/build-push-action@v2
7582
with:
7683
context: 8.1-dev/${{ matrix.ubuntu }}/${{ matrix.sapi }}
7784
no-cache: true
78-
push: true
85+
push: ${{ github.event_name != 'pull_request' }}
7986
tags: |
8087
phpdaily/php:8.1-${{ matrix.sapi }}-${{ matrix.ubuntu }}
8188
${{ env.tag_generic_platform }}

.github/workflows/php82.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- master
77
paths:
8+
- .github/workflows/php82.yml
9+
- '8.2-dev/**'
10+
pull_request:
11+
paths:
12+
- .github/workflows/php82.yml
813
- '8.2-dev/**'
914
schedule:
1015
- cron: '0 0 * * *'
@@ -29,6 +34,7 @@ jobs:
2934
with:
3035
username: ${{ secrets.DOCKERHUB_USERNAME }}
3136
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
if: github.event_name != 'pull_request'
3238
- run: |
3339
echo "tag_generic_version=phpdaily/php:8.2" >> $GITHUB_ENV
3440
echo "tag_short_platform=phpdaily/php:8.2-alpine" >> $GITHUB_ENV
@@ -40,7 +46,7 @@ jobs:
4046
with:
4147
context: 8.2-dev/${{ matrix.alpine }}/${{ matrix.sapi }}
4248
no-cache: true
43-
push: true
49+
push: ${{ github.event_name != 'pull_request' }}
4450
tags: |
4551
phpdaily/php:8.2-${{ matrix.sapi }}-${{ matrix.alpine }}
4652
${{ env.tag_generic_version }}
@@ -66,14 +72,15 @@ jobs:
6672
with:
6773
username: ${{ secrets.DOCKERHUB_USERNAME }}
6874
password: ${{ secrets.DOCKERHUB_TOKEN }}
75+
if: github.event_name != 'pull_request'
6976
- run: echo "tag_generic_platform=phpdaily/php:8.2-${{ matrix.ubuntu }}" >> $GITHUB_ENV
7077
if: ${{ matrix.sapi == 'cli' }}
7178
- name: Build
7279
uses: docker/build-push-action@v2
7380
with:
7481
context: 8.2-dev/${{ matrix.ubuntu }}/${{ matrix.sapi }}
7582
no-cache: true
76-
push: true
83+
push: ${{ github.event_name != 'pull_request' }}
7784
tags: |
7885
phpdaily/php:8.2-${{ matrix.sapi }}-${{ matrix.ubuntu }}
7986
${{ env.tag_generic_platform }}

0 commit comments

Comments
 (0)