Skip to content

Commit 72d61a7

Browse files
committed
chore: split out latest and release builds for faster parallelism
1 parent c53053e commit 72d61a7

File tree

2 files changed

+64
-8
lines changed

2 files changed

+64
-8
lines changed

.github/workflows/latest.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,38 @@ on:
66
- main
77

88
jobs:
9-
latest:
9+
latest-amd64:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: docker/setup-qemu-action@v3
14-
- uses: docker/setup-buildx-action@v3
1514
- name: Sign into Docker
1615
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
17-
- name: Build latest Docker image and push to Docker Hub
18-
run: docker buildx build --push -t justintime50/nginx-php --platform linux/amd64,linux/arm/v7,linux/arm64 .
16+
- name: Build Docker image
17+
run: docker build -t justintime50/nginx-php:latest --platform linux/amd64 .
18+
- name: Push image to Hub
19+
run: docker push justintime50/nginx-php:latest
20+
21+
latest-arm-v7:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: docker/setup-qemu-action@v3
26+
- name: Sign into Docker
27+
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
28+
- name: Build Docker image
29+
run: docker build -t justintime50/nginx-php:latest --platform linux/arm/v7 .
30+
- name: Push image to Hub
31+
run: docker push justintime50/nginx-php:latest
32+
33+
latest-arm64:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: docker/setup-qemu-action@v3
38+
- name: Sign into Docker
39+
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
40+
- name: Build Docker image
41+
run: docker build -t justintime50/nginx-php:latest --platform linux/arm64 .
42+
- name: Push image to Hub
43+
run: docker push justintime50/nginx-php:latest

.github/workflows/release.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,47 @@ on:
66
- '*'
77

88
jobs:
9-
release:
9+
release-amd64:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
1313
php_version: ['8.1', '8.2', '8.3', '8.4']
1414
steps:
1515
- uses: actions/checkout@v4
1616
- uses: docker/setup-qemu-action@v3
17-
- uses: docker/setup-buildx-action@v3
1817
- name: Sign into Docker
1918
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
20-
- name: Build Docker image and push to Docker Hub
21-
run: docker buildx build --push -t justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/} --build-arg PHP_VERSION=${{ matrix.php_version }} --platform linux/amd64,linux/arm/v7,linux/arm64 .
19+
- name: Build Docker image
20+
run: docker build -t justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/} --build-arg PHP_VERSION=${{ matrix.php_version }} --platform linux/amd64 .
21+
- name: Push image to Hub
22+
run: docker push justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/}
23+
24+
release-arm-v7:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
php_version: ['8.1', '8.2', '8.3', '8.4']
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: docker/setup-qemu-action@v3
32+
- name: Sign into Docker
33+
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
34+
- name: Build Docker image
35+
run: docker build -t justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/} --build-arg PHP_VERSION=${{ matrix.php_version }} --platform linux/arm/v7 .
36+
- name: Push image to Hub
37+
run: docker push justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/}
38+
39+
release-arm64:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
php_version: ['8.1', '8.2', '8.3', '8.4']
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: docker/setup-qemu-action@v3
47+
- name: Sign into Docker
48+
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
49+
- name: Build Docker image
50+
run: docker build -t justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/} --build-arg PHP_VERSION=${{ matrix.php_version }} --platform linux/arm64 .
51+
- name: Push image to Hub
52+
run: docker push justintime50/nginx-php:${{ matrix.php_version }}-${GITHUB_REF##*/}

0 commit comments

Comments
 (0)