Skip to content

Commit b66ff18

Browse files
authored
Merge pull request #25 from wayofdev/feat/refactor
2 parents d7f9c8a + f986dfa commit b66ff18

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/build-latest.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
on: # yamllint disable-line rule:truthy
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
85
pull_request:
96
branches:
107
- master
@@ -18,7 +15,8 @@ jobs:
1815
outputs:
1916
matrix: ${{ steps.matrix.outputs.matrix }}
2017
steps:
21-
- id: matrix
18+
- name: ⚙️ Generate matrix
19+
id: matrix
2220
run: |
2321
echo 'matrix={
2422
"os_name": ["alpine"],
@@ -33,8 +31,9 @@ jobs:
3331
uses: wayofdev/gh-actions/.github/workflows/build-image.yml@master
3432
with:
3533
os: "ubuntu-latest"
36-
push-to-hub: ${{ github.event_name != 'pull_request' }}
34+
push-to-hub: true
3735
image-namespace: "wayofdev/php-base"
36+
image-template-path: "./dist/base"
3837
image-template: ${{ matrix.php_version }}-${{ matrix.php_type }}-${{ matrix.os_name }}
3938
image-version: latest
4039
secrets:

.github/workflows/build-release.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
runs-on: "ubuntu-latest"
1414
outputs:
1515
matrix: ${{ steps.matrix.outputs.matrix }}
16+
version: ${{ steps.version.outputs.version }}
1617
steps:
1718
- name: ⚙️ Generate matrix
1819
id: matrix
@@ -26,7 +27,9 @@ jobs:
2627
- name: ⚙️ Get version for image tag
2728
id: version
2829
run: |
29-
echo "version=$(echo ${GITHUB_REF#refs/*/} | cut -c 2-)" >> $GITHUB_OUTPUT
30+
version=${{ github.ref_name }}
31+
version=${version#v}
32+
echo "version=$version" >> $GITHUB_OUTPUT
3033
3134
build:
3235
needs: prepare
@@ -37,6 +40,7 @@ jobs:
3740
os: "ubuntu-latest"
3841
push-to-hub: true
3942
image-namespace: "wayofdev/php-base"
43+
image-template-path: "./dist/base"
4044
image-template: ${{ matrix.php_version }}-${{ matrix.php_type }}-${{ matrix.os_name }}
4145
image-version: ${{ needs.prepare.outputs.version }}
4246
secrets:

0 commit comments

Comments
 (0)