Skip to content

Commit c18f19b

Browse files
committed
fix(workflow): use same OS in all jobs
1 parent dc1fdc9 commit c18f19b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/_prepare.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: _prepare
33
on:
44
workflow_call:
55
inputs:
6+
os:
7+
description: GitHub Actions runner OS
8+
type: string
9+
required: true
610
builder_ref:
711
description: Git ref to checkout of build-emacs-for-macos
812
required: false
@@ -15,9 +19,7 @@ on:
1519

1620
jobs:
1721
emacs-builder:
18-
# Use oldest version of macOS to ensure emacs-bulder binary is compatible
19-
# with later versions of macOS.
20-
runs-on: macos-11
22+
runs-on: ${{ inputs.os }}
2123
steps:
2224
- name: Checkout build-emacs-for-macos repo
2325
uses: actions/checkout@v3

.github/workflows/_release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: _release
44
on:
55
workflow_call:
66
inputs:
7+
os:
8+
description: GitHub Actions runner OS
9+
type: string
10+
required: true
711
plan_artifact:
812
description: Name of artifact containing a emacs-builder plan yaml file
913
type: string
@@ -12,14 +16,18 @@ on:
1216
description: Name of artifact containing a *.dmg files to release
1317
type: string
1418
required: true
19+
test_build_name:
20+
description: "Test build name"
21+
type: string
22+
required: false
1523
secrets:
1624
TAP_REPO_TOKEN:
1725
description: Personal Access Token for Homebrew Tap repo
1826
required: true
1927

2028
jobs:
2129
github:
22-
runs-on: macos-11
30+
runs-on: ${{ inputs.os }}
2331
steps:
2432
- name: Download pre-built emacs-builder artifact
2533
uses: actions/download-artifact@v3
@@ -48,7 +56,7 @@ jobs:
4856
env:
4957
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5058
- name: Trigger update casks workflow in homebrew tap
51-
if: ${{ steps.dmg.outputs.result != 'fail' && inputs.testBuildName == '' }}
59+
if: ${{ steps.dmg.outputs.result != 'fail' && inputs.test_build_name == '' }}
5260
run: >-
5361
gh workflow run --repo jimeh/homebrew-emacs-builds update-casks.yml
5462
env:

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
name: Prepare
3737
uses: ./.github/workflows/_prepare.yml
3838
with:
39+
os: ${{ github.event.inputs.os }}
3940
builder_ref: ${{ github.event.inputs.builder_ref }}
4041
secrets:
4142
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
@@ -66,7 +67,9 @@ jobs:
6667
needs: [build]
6768
uses: ./.github/workflows/_release.yml
6869
with:
70+
os: ${{ github.event.inputs.os }}
6971
plan_artifact: build-plan
7072
dmg_artifact: dmg
73+
test_build_name: ${{ github.event.inputs.test_build_name }}
7174
secrets:
7275
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}

0 commit comments

Comments
 (0)