Skip to content

Commit

Permalink
Pass parameters to reusable wf as JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed Aug 28, 2023
1 parent 0666546 commit a13d67c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/deploy-all-production-accounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: ./.github/workflows/deploy-multiple-accounts.yml
secrets: inherit
with:
helplines: [
helplines: toJson([
'AS',
#'CA',
#'CL',
Expand All @@ -41,7 +41,6 @@ jobs:
#'ZM',
#'ZW',
#'MT',
]
environments: [ PROD ]
changelog: ${{ inputs.changelog }}
])
environments: toJson([ PROD ])

7 changes: 3 additions & 4 deletions .github/workflows/deploy-all-staging-accounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: ./.github/workflows/deploy-multiple-accounts.yml
secrets: inherit
with:
helplines: [
helplines: toJson([
'AS',
'CA',
'CL',
Expand All @@ -45,6 +45,5 @@ jobs:
'PL',
'MT',
'NZ'
]
environments: [ STG ]
changelog: ${{ inputs.changelog }}
])
environments: toJson([ STG ])
12 changes: 6 additions & 6 deletions .github/workflows/deploy-multiple-accounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ on:
workflow_call:
inputs:
helplines:
description: 'List of helplines to deploy to'
description: 'List of helplines to deploy to (as a JSON array)'
required: true
type: array
type: string
environments:
type: array
description: Release Changelog - Add a comment about the changes to be included in this release.
type: string
description: Environments to deploy to (as a JSON array)
required: true
jobs:
deploy-helplines:
strategy:
fail-fast: false
matrix:
short_helplines: input.helplines
environment_codes: input.environments
short_helplines: fromJson(input.helplines)
environment_codes: fromJson(input.environments)
uses: ./.github/workflows/custom_helpline.yml
secrets: inherit
with:
Expand Down

0 comments on commit a13d67c

Please sign in to comment.