From c18f19b60b8bc4d89f4899a058226262eb6c65b9 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 14 Nov 2023 23:41:24 +0000 Subject: [PATCH] fix(workflow): use same OS in all jobs --- .github/workflows/_prepare.yml | 8 +++++--- .github/workflows/_release.yml | 12 ++++++++++-- .github/workflows/build.yml | 3 +++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 230b2e2..a9c9252 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -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 diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 22f6f24..385b63c 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -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: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6a1b0d..c99d5af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }}