Skip to content

Commit bb0e1b3

Browse files
committed
Merge branch '7.3' into 8.2
2 parents 531feed + 3a454b2 commit bb0e1b3

2 files changed

Lines changed: 40 additions & 19 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ name: Build image and push to Docker Hub
33
on:
44
push:
55
workflow_dispatch:
6-
schedule:
7-
- cron: '20 4 * * *'
8-
9-
env:
10-
BRANCH: '8.2'
11-
APACHE_WORKFLOW_ID: '8995258'
12-
SWOOLE_WORKFLOW_ID: '8996324'
136

147
jobs:
158
build:
@@ -23,16 +16,16 @@ jobs:
2316
name: Checkout
2417
uses: actions/checkout@v2
2518
with:
26-
ref: ${{ env.BRANCH }}
19+
ref: ${{ github.ref_name }}
2720
-
2821
name: Set up QEMU
29-
uses: docker/setup-qemu-action@v1
22+
uses: docker/setup-qemu-action@v3
3023
-
3124
name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v1
25+
uses: docker/setup-buildx-action@v3
3326
-
3427
name: Login to Docker Hub
35-
uses: docker/login-action@v1
28+
uses: docker/login-action@v3
3629
with:
3730
username: ${{ secrets.DOCKERHUB_USERNAME }}
3831
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -47,35 +40,33 @@ jobs:
4740
fi
4841
-
4942
name: Build latest
50-
if: ${{ env.BRANCH == '8.3' && matrix.version == 'base' }}
51-
uses: docker/build-push-action@v2
43+
if: ${{ github.ref_name == '8.3' && matrix.version == 'base' }}
44+
uses: docker/build-push-action@v6
5245
with:
5346
context: ./base
5447
push: true
5548
platforms: ${{ secrets.DOCKER_PLATFORMS }}
5649
tags: rshop/php:latest
5750
-
5851
name: Build ${{ matrix.version }}
59-
uses: docker/build-push-action@v2
52+
uses: docker/build-push-action@v6
6053
with:
6154
context: ./${{ matrix.version }}
6255
push: true
6356
platforms: ${{ secrets.DOCKER_PLATFORMS }}
64-
tags: rshop/php:${{ env.BRANCH }}${{ steps.build-tag.outputs.tag }}
57+
tags: rshop/php:${{ github.ref_name }}${{ steps.build-tag.outputs.tag }}
6558
-
6659
name: Trigger apache ${{ matrix.version }} rebuild
6760
uses: rshop/trigger-workflow-action@v1
6861
with:
6962
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
7063
repository: 'rshop/docker-php-apache'
71-
workflowId: ${{ env.APACHE_WORKFLOW_ID }}
72-
branch: ${{ env.BRANCH }}${{ steps.build-tag.outputs.tag }}
64+
branch: ${{ github.ref_name }}${{ steps.build-tag.outputs.tag }}
7365
-
7466
name: Trigger swoole ${{ matrix.version }} rebuild
7567
if: ${{ !contains(matrix.version, 'xdebug') }}
7668
uses: rshop/trigger-workflow-action@v1
7769
with:
7870
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
7971
repository: 'rshop/docker-swoole'
80-
workflowId: ${{ env.SWOOLE_WORKFLOW_ID }}
81-
branch: ${{ env.BRANCH }}${{ steps.build-tag.outputs.tag }}
72+
branch: ${{ github.ref_name }}${{ steps.build-tag.outputs.tag }}

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Schedule Branch Builds
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 3 * * *'
7+
8+
jobs:
9+
workflow:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
branch:
14+
- { name: '7.3', delay: 0 }
15+
- { name: '7.4', delay: 1200 }
16+
- { name: '8.0', delay: 2400 }
17+
- { name: '8.1', delay: 3600 }
18+
- { name: '8.2', delay: 4800 }
19+
- { name: '8.3', delay: 6000 }
20+
21+
steps:
22+
- name: Delay
23+
run: sleep ${{ matrix.branch.delay }}
24+
25+
- name: Trigger build workflow on ${{ matrix.branch.name }}
26+
uses: rshop/trigger-workflow-action@v1
27+
with:
28+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
29+
repository: 'rshop/docker-php'
30+
branch: ${{ matrix.branch.name }}

0 commit comments

Comments
 (0)