Skip to content

Commit 0247859

Browse files
committed
Split job to avoid tainting workspace
1 parent 76e15d0 commit 0247859

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/ipxe_version.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,32 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
ipxe_version:
9+
get-version:
1010
runs-on: ubuntu-latest
11+
outputs:
12+
sha: ${{ steps.version.outputs.sha }}
13+
sha-short: ${{ steps.version.outputs.sha-short }}
1114
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v3
14-
1515
- name: Checkout iPXE from master
1616
uses: actions/checkout@v3
1717
with:
18-
path: ${{ env.RUNNER_TEMP }}/ipxe
1918
repository: ipxe/ipxe
2019

2120
- name: Get version
2221
uses: ./.github/actions/version
23-
with:
24-
path: ${{ env.RUNNER_TEMP }}/ipxe
2522
id: version
2623

24+
update-version:
25+
runs-on: ubuntu-latest
26+
needs:
27+
- get-version
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
2732
- name: Update version string
2833
run: |
29-
sed -Ei 's/(IPXE_REF: )[0-9a-f]{40}/\1${{ steps.version.outputs.sha }}/' .github/workflows/ipxe_build.yaml
34+
sed -Ei 's/(IPXE_REF: )[0-9a-f]{40}/\1${{ needs.get-version.outputs.sha }}/' .github/workflows/ipxe_build.yaml
3035
3136
- name: Check dirty status
3237
id: dirty
@@ -42,9 +47,9 @@ jobs:
4247
if: steps.dirty.outputs.dirty == 'true'
4348
uses: peter-evans/create-pull-request@v4
4449
with:
45-
title: ':arrow_up: Bump ipxe/ipxe to ${{ steps.version.outputs.sha-short }}'
46-
body: 'https://github.com/ipxe/ipxe/commits/${{ steps.version.outputs.sha }}'
47-
commit-message: ':arrow_up: Bump ipxe/ipxe to ${{ steps.version.outputs.sha-short }}'
50+
title: ':arrow_up: Bump ipxe/ipxe to ${{ needs.get-version.outputs.sha-short }}'
51+
body: 'https://github.com/ipxe/ipxe/commits/${{ needs.get-version.outputs.sha }}'
52+
commit-message: ':arrow_up: Bump ipxe/ipxe to ${{ needs.get-version.outputs.sha-short }}'
4853
labels: dependencies
4954
branch: ipxe-version
5055
delete-branch: true

0 commit comments

Comments
 (0)