From 3a062b17d59675d6a23c312239793f2ac2f0c3d3 Mon Sep 17 00:00:00 2001 From: Sergey Lappo Date: Mon, 12 Aug 2024 15:11:37 +0200 Subject: [PATCH] Allow to pass runner as an optional workflow param --- .github/workflows/release-for-testing.yml | 10 ++++++++-- .github/workflows/release-new-version.yml | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-for-testing.yml b/.github/workflows/release-for-testing.yml index fe74f21..1188a1b 100644 --- a/.github/workflows/release-for-testing.yml +++ b/.github/workflows/release-for-testing.yml @@ -4,6 +4,12 @@ name: Release for testing on: workflow_call: + inputs: + runner: + description: Runner to run the workflow + required: false + type: string + default: 'ubuntu-latest' outputs: version: description: Version number of the image released to ECR @@ -11,7 +17,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ inputs.runner }} env: IS_DEFAULT_BRANCH: ${{ contains('refs/heads/main, refs/heads/master', github.ref) }} secrets: ${{ toJSON(secrets) }} @@ -36,4 +42,4 @@ jobs: - id: upload-build-artifacts name: "Upload build artifacts" if: always() - uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.07.31.12.26-dd8f9fa \ No newline at end of file + uses: sympower/sympower-composite-actions/upload-build-artifacts@2024.07.31.12.26-dd8f9fa diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml index e997e8e..d1ea69c 100644 --- a/.github/workflows/release-new-version.yml +++ b/.github/workflows/release-new-version.yml @@ -8,6 +8,11 @@ on: gistID: required: true type: string + runner: + description: Runner to run the workflow + required: false + type: string + default: 'ubuntu-latest' outputs: version: description: Version number of the image released to ECR @@ -15,7 +20,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ inputs.runner }} env: IS_DEFAULT_BRANCH: ${{ contains('refs/heads/main, refs/heads/master', github.ref) }} secrets: ${{ toJSON(secrets) }}