fix(workflow): use same OS in all jobs

This commit is contained in:
2023-11-14 23:41:24 +00:00
parent dc1fdc91fc
commit c18f19b60b
3 changed files with 18 additions and 5 deletions

View File

@@ -3,6 +3,10 @@ name: _prepare
on:
workflow_call:
inputs:
os:
description: GitHub Actions runner OS
type: string
required: true
builder_ref:
description: Git ref to checkout of build-emacs-for-macos
required: false
@@ -15,9 +19,7 @@ on:
jobs:
emacs-builder:
# Use oldest version of macOS to ensure emacs-bulder binary is compatible
# with later versions of macOS.
runs-on: macos-11
runs-on: ${{ inputs.os }}
steps:
- name: Checkout build-emacs-for-macos repo
uses: actions/checkout@v3

View File

@@ -4,6 +4,10 @@ name: _release
on:
workflow_call:
inputs:
os:
description: GitHub Actions runner OS
type: string
required: true
plan_artifact:
description: Name of artifact containing a emacs-builder plan yaml file
type: string
@@ -12,6 +16,10 @@ on:
description: Name of artifact containing a *.dmg files to release
type: string
required: true
test_build_name:
description: "Test build name"
type: string
required: false
secrets:
TAP_REPO_TOKEN:
description: Personal Access Token for Homebrew Tap repo
@@ -19,7 +27,7 @@ on:
jobs:
github:
runs-on: macos-11
runs-on: ${{ inputs.os }}
steps:
- name: Download pre-built emacs-builder artifact
uses: actions/download-artifact@v3
@@ -48,7 +56,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger update casks workflow in homebrew tap
if: ${{ steps.dmg.outputs.result != 'fail' && inputs.testBuildName == '' }}
if: ${{ steps.dmg.outputs.result != 'fail' && inputs.test_build_name == '' }}
run: >-
gh workflow run --repo jimeh/homebrew-emacs-builds update-casks.yml
env:

View File

@@ -36,6 +36,7 @@ jobs:
name: Prepare
uses: ./.github/workflows/_prepare.yml
with:
os: ${{ github.event.inputs.os }}
builder_ref: ${{ github.event.inputs.builder_ref }}
secrets:
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
@@ -66,7 +67,9 @@ jobs:
needs: [build]
uses: ./.github/workflows/_release.yml
with:
os: ${{ github.event.inputs.os }}
plan_artifact: build-plan
dmg_artifact: dmg
test_build_name: ${{ github.event.inputs.test_build_name }}
secrets:
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}