Skip to content

Commit b356dd8

Browse files
[github-actions] Resolve consumer action paths in reusable workflows (#180) (#184)
* [github-actions] Resolve consumer action paths in reusable workflows (#180) * Update wiki submodule pointer for PR #184 * [github-actions] Sparse-checkout workflow action source (#180) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent db2dbb7 commit b356dd8

12 files changed

Lines changed: 298 additions & 51 deletions

.github/wiki

Submodule wiki updated from 7025665 to b7fe0de

.github/workflows/auto-assign.yml

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,16 @@ jobs:
2828
project_number: ${{ steps.resolve.outputs.project-number }}
2929
steps:
3030
- uses: actions/checkout@v6
31+
- name: Checkout dev-tools workflow action source
32+
uses: actions/checkout@v6
33+
with:
34+
repository: php-fast-forward/dev-tools
35+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
36+
path: .dev-tools-actions
37+
sparse-checkout: |
38+
.github/actions
3139
- id: resolve
32-
uses: ./.github/actions/project-board/resolve
40+
uses: ./.dev-tools-actions/.github/actions/project-board/resolve
3341
with:
3442
project: ${{ inputs.project || vars.PROJECT || '' }}
3543

@@ -48,7 +56,15 @@ jobs:
4856
runs-on: ubuntu-latest
4957
steps:
5058
- uses: actions/checkout@v6
51-
- uses: ./.github/actions/project-board/sync-status
59+
- name: Checkout dev-tools workflow action source
60+
uses: actions/checkout@v6
61+
with:
62+
repository: php-fast-forward/dev-tools
63+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
64+
path: .dev-tools-actions
65+
sparse-checkout: |
66+
.github/actions
67+
- uses: ./.dev-tools-actions/.github/actions/project-board/sync-status
5268
with:
5369
organization: ${{ github.repository_owner }}
5470
project: ${{ needs.resolve-project.outputs.project_number }}
@@ -61,7 +77,15 @@ jobs:
6177
runs-on: ubuntu-latest
6278
steps:
6379
- uses: actions/checkout@v6
64-
- uses: ./.github/actions/project-board/sync-linked-pr-metadata
80+
- name: Checkout dev-tools workflow action source
81+
uses: actions/checkout@v6
82+
with:
83+
repository: php-fast-forward/dev-tools
84+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
85+
path: .dev-tools-actions
86+
sparse-checkout: |
87+
.github/actions
88+
- uses: ./.dev-tools-actions/.github/actions/project-board/sync-linked-pr-metadata
6589

6690
sync-pull-request-status:
6791
needs: resolve-project
@@ -73,18 +97,26 @@ jobs:
7397
pull_request_status: ${{ steps.compute.outputs.pull-request-status }}
7498
steps:
7599
- uses: actions/checkout@v6
100+
- name: Checkout dev-tools workflow action source
101+
uses: actions/checkout@v6
102+
with:
103+
repository: php-fast-forward/dev-tools
104+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
105+
path: .dev-tools-actions
106+
sparse-checkout: |
107+
.github/actions
76108
- id: compute
77-
uses: ./.github/actions/project-board/resolve-pr-status
109+
uses: ./.dev-tools-actions/.github/actions/project-board/resolve-pr-status
78110

79-
- uses: ./.github/actions/project-board/sync-status
111+
- uses: ./.dev-tools-actions/.github/actions/project-board/sync-status
80112
with:
81113
organization: ${{ github.repository_owner }}
82114
project: ${{ needs.resolve-project.outputs.project_number }}
83115
resource-node-id: ${{ github.event.pull_request.node_id }}
84116
status-value: ${{ steps.compute.outputs.pull-request-status }}
85117

86118
- if: steps.compute.outputs.linked-issue-node-id != '' && steps.compute.outputs.linked-issue-status != ''
87-
uses: ./.github/actions/project-board/sync-status
119+
uses: ./.dev-tools-actions/.github/actions/project-board/sync-status
88120
with:
89121
organization: ${{ github.repository_owner }}
90122
project: ${{ needs.resolve-project.outputs.project_number }}
@@ -97,10 +129,18 @@ jobs:
97129
runs-on: ubuntu-latest
98130
steps:
99131
- uses: actions/checkout@v6
132+
- name: Checkout dev-tools workflow action source
133+
uses: actions/checkout@v6
134+
with:
135+
repository: php-fast-forward/dev-tools
136+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
137+
path: .dev-tools-actions
138+
sparse-checkout: |
139+
.github/actions
100140
- id: compute
101-
uses: ./.github/actions/project-board/resolve-review-status
141+
uses: ./.dev-tools-actions/.github/actions/project-board/resolve-review-status
102142

103-
- uses: ./.github/actions/project-board/sync-status
143+
- uses: ./.dev-tools-actions/.github/actions/project-board/sync-status
104144
with:
105145
organization: ${{ github.repository_owner }}
106146
project: ${{ needs.resolve-project.outputs.project_number }}

.github/workflows/changelog.yml

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,18 @@ jobs:
7171

7272
steps:
7373
- uses: actions/checkout@v6
74+
- name: Checkout dev-tools workflow action source
75+
uses: actions/checkout@v6
76+
with:
77+
repository: php-fast-forward/dev-tools
78+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
79+
path: .dev-tools-actions
80+
sparse-checkout: |
81+
.github/actions
7482
7583
- name: Resolve workflow PHP version
7684
id: resolve
77-
uses: ./.github/actions/php/resolve-version
85+
uses: ./.dev-tools-actions/.github/actions/php/resolve-version
7886

7987
validate_pull_request:
8088
name: Validate PR Changelog
@@ -89,9 +97,17 @@ jobs:
8997
- uses: actions/checkout@v6
9098
with:
9199
fetch-depth: 0
100+
- name: Checkout dev-tools workflow action source
101+
uses: actions/checkout@v6
102+
with:
103+
repository: php-fast-forward/dev-tools
104+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
105+
path: .dev-tools-actions
106+
sparse-checkout: |
107+
.github/actions
92108
93109
- name: Setup PHP and install dependencies
94-
uses: ./.github/actions/php/setup-composer
110+
uses: ./.dev-tools-actions/.github/actions/php/setup-composer
95111
with:
96112
php-version: ${{ needs.resolve_php.outputs.php-version }}
97113
root-version: ${{ env.CHANGELOG_ROOT_VERSION }}
@@ -107,7 +123,7 @@ jobs:
107123
BASE_REF: ${{ github.event.pull_request.base.ref }}
108124
run: composer dev-tools changelog:check -- --file="${CHANGELOG_FILE}" --against="origin/${BASE_REF}"
109125

110-
- uses: ./.github/actions/summary/write
126+
- uses: ./.dev-tools-actions/.github/actions/summary/write
111127
with:
112128
markdown: |
113129
## Changelog Validation Summary
@@ -132,17 +148,25 @@ jobs:
132148
token: ${{ github.token }}
133149
ref: ${{ github.event.repository.default_branch }}
134150
fetch-depth: 0
151+
- name: Checkout dev-tools workflow action source
152+
uses: actions/checkout@v6
153+
with:
154+
repository: php-fast-forward/dev-tools
155+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
156+
path: .dev-tools-actions
157+
sparse-checkout: |
158+
.github/actions
135159
136160
- name: Setup PHP and install dependencies
137-
uses: ./.github/actions/php/setup-composer
161+
uses: ./.dev-tools-actions/.github/actions/php/setup-composer
138162
with:
139163
php-version: ${{ needs.resolve_php.outputs.php-version }}
140164
root-version: ${{ env.CHANGELOG_ROOT_VERSION }}
141165
install-options: --prefer-dist --no-progress --no-interaction --no-plugins --no-scripts
142166

143167
- name: Resolve release version
144168
id: version
145-
uses: ./.github/actions/changelog/resolve-version
169+
uses: ./.dev-tools-actions/.github/actions/changelog/resolve-version
146170
with:
147171
changelog-file: ${{ env.CHANGELOG_FILE }}
148172
version: ${{ inputs.version || '' }}
@@ -155,7 +179,7 @@ jobs:
155179
composer dev-tools changelog:promote -- "${RELEASE_VERSION}" --file="${CHANGELOG_FILE}" --date="${release_date}"
156180
157181
- name: Render release notes preview
158-
uses: ./.github/actions/changelog/render-release-notes
182+
uses: ./.dev-tools-actions/.github/actions/changelog/render-release-notes
159183
with:
160184
changelog-file: ${{ env.CHANGELOG_FILE }}
161185
version: ${{ steps.version.outputs.value }}
@@ -183,14 +207,22 @@ jobs:
183207
- source: `${{ steps.version.outputs.source }}`
184208
185209
- uses: actions/checkout@v6
210+
- name: Checkout dev-tools workflow action source
211+
uses: actions/checkout@v6
212+
with:
213+
repository: php-fast-forward/dev-tools
214+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
215+
path: .dev-tools-actions
216+
sparse-checkout: |
217+
.github/actions
186218
187-
- uses: ./.github/actions/project-board/transition-status
219+
- uses: ./.dev-tools-actions/.github/actions/project-board/transition-status
188220
with:
189221
project: ${{ inputs.project || vars.PROJECT || '' }}
190222
from-status: Merged
191223
to-status: Release Prepared
192224

193-
- uses: ./.github/actions/summary/write
225+
- uses: ./.dev-tools-actions/.github/actions/summary/write
194226
with:
195227
markdown: |
196228
## Release Preparation Summary
@@ -217,44 +249,60 @@ jobs:
217249
token: ${{ github.token }}
218250
ref: ${{ github.event.pull_request.base.ref }}
219251
fetch-depth: 0
252+
- name: Checkout dev-tools workflow action source
253+
uses: actions/checkout@v6
254+
with:
255+
repository: php-fast-forward/dev-tools
256+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
257+
path: .dev-tools-actions
258+
sparse-checkout: |
259+
.github/actions
220260
221261
- name: Setup PHP and install dependencies
222-
uses: ./.github/actions/php/setup-composer
262+
uses: ./.dev-tools-actions/.github/actions/php/setup-composer
223263
with:
224264
php-version: ${{ needs.resolve_php.outputs.php-version }}
225265
root-version: ${{ env.CHANGELOG_ROOT_VERSION }}
226266
install-options: --prefer-dist --no-progress --no-interaction --no-plugins --no-scripts
227267

228268
- name: Resolve merged release version
229269
id: version
230-
uses: ./.github/actions/changelog/resolve-merged-version
270+
uses: ./.dev-tools-actions/.github/actions/changelog/resolve-merged-version
231271
with:
232272
head-ref: ${{ github.event.pull_request.head.ref }}
233273
release-branch-prefix: ${{ env.RELEASE_BRANCH_PREFIX }}
234274

235275
- name: Render release notes
236-
uses: ./.github/actions/changelog/render-release-notes
276+
uses: ./.dev-tools-actions/.github/actions/changelog/render-release-notes
237277
with:
238278
changelog-file: ${{ env.CHANGELOG_FILE }}
239279
version: ${{ steps.version.outputs.value }}
240280

241281
- name: Publish GitHub release
242282
id: publish_release
243-
uses: ./.github/actions/changelog/publish-release
283+
uses: ./.dev-tools-actions/.github/actions/changelog/publish-release
244284
with:
245285
version: ${{ steps.version.outputs.value }}
246286
target: ${{ github.event.pull_request.merge_commit_sha || github.sha }}
247287

248288
- uses: actions/checkout@v6
289+
- name: Checkout dev-tools workflow action source
290+
uses: actions/checkout@v6
291+
with:
292+
repository: php-fast-forward/dev-tools
293+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
294+
path: .dev-tools-actions
295+
sparse-checkout: |
296+
.github/actions
249297
250-
- uses: ./.github/actions/project-board/transition-status
298+
- uses: ./.dev-tools-actions/.github/actions/project-board/transition-status
251299
with:
252300
project: ${{ inputs.project || vars.PROJECT || '' }}
253301
from-status: Release Prepared
254302
to-status: Released
255303
include-current-pull-request: 'true'
256304

257-
- uses: ./.github/actions/summary/write
305+
- uses: ./.dev-tools-actions/.github/actions/summary/write
258306
with:
259307
markdown: |
260308
## Release Publication Summary

.github/workflows/label-sync.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ jobs:
2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@v6
27+
- name: Checkout dev-tools workflow action source
28+
uses: actions/checkout@v6
29+
with:
30+
repository: php-fast-forward/dev-tools
31+
ref: ${{ github.repository == 'php-fast-forward/dev-tools' && (github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha) || 'main' }}
32+
path: .dev-tools-actions
33+
sparse-checkout: |
34+
.github/actions
2735
2836
- name: Copy labels from issue to PR
29-
uses: ./.github/actions/label-sync/copy-linked-issue-labels
37+
uses: ./.dev-tools-actions/.github/actions/label-sync/copy-linked-issue-labels

0 commit comments

Comments
 (0)