From 86ff301e0497e4b6f3eeb9ff61b8938dbd33b40f Mon Sep 17 00:00:00 2001 From: kenorb Date: Tue, 20 Aug 2024 22:33:03 +0100 Subject: [PATCH] GHA: Compile: Adds checkout_branch input --- .github/workflows/compile.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 6747afb..ba549f8 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -4,6 +4,8 @@ name: Compile # Setting an environment variable with the value of a configuration variable. env: ARTIFACT_PREFIX: ${{ inputs.artifact_prefix || 'mt' }} + # yamllint disable-line rule:line-length + CHECKOUT_BRANCH: ${{ inputs.checkout_branch || github.head_ref || github.ref_name }} INDI_COMMON_WORKDIR: ${{ vars.INDI_COMMON_WORKDIR || 'indicators-common' }} REPOSITORY: EA31337/EA31337-indicators-common SKIP_CLEANUP: ${{ inputs.skip_cleanup || false }} @@ -31,6 +33,11 @@ on: description: Artifact prefix. required: false type: string + checkout_branch: + default: ${{ github.head_ref || github.ref_name }} + description: Checkout branch + required: false + type: string skip_cleanup: default: false description: Whether to skip a clean-up job. @@ -105,7 +112,7 @@ jobs: defaults: run: shell: powershell - name: Compile indicators + name: Compile Indicators needs: [compile-platform-indicators] runs-on: windows-latest strategy: @@ -115,7 +122,7 @@ jobs: - uses: actions/checkout@v4 with: path: ${{ env.INDI_COMMON_WORKDIR }} - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ env.CHECKOUT_BRANCH }} repository: EA31337/EA31337-indicators-common - uses: actions/checkout@v4 with: