Skip to content

Commit

Permalink
Allow to pass runner as an optional workflow param
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-lappo-sympower authored Aug 12, 2024
1 parent 1b35b4e commit 3a062b1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release-for-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ 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
value: ${{ jobs.build.outputs.version }}

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) }}
Expand All @@ -36,4 +42,4 @@ jobs:
- id: upload-build-artifacts
name: "Upload build artifacts"
if: always()
uses: sympower/sympower-composite-actions/[email protected]
uses: sympower/sympower-composite-actions/[email protected]
7 changes: 6 additions & 1 deletion .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ 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
value: ${{ jobs.build.outputs.version }}

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) }}
Expand Down

0 comments on commit 3a062b1

Please sign in to comment.