Skip to content

Commit 97e9620

Browse files
committed
TCLOUD-4860: Work around inputs limitation
The inputs are only available for a dispatch event.
1 parent 8af3706 commit 97e9620

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/deploy_docs_v2.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ permissions:
1818
id-token: write
1919

2020
env:
21-
ENVNAME: ${{ inputs.environment }}
22-
ACCT: ${{ inputs.environment == 'production' && '990880627107' || '327995277200' }}
23-
BUCKET: ${{ inputs.environment == 'production' && 'tiny-cloud-antora-docs-release' || 'tiny-cloud-antora-docs-preview' }}
24-
RUN: run-${{ github.run_number }}-${{ github.run_attempt }}
21+
# inputs are only defined on a dispatch event, so to test we provide a default...
22+
TARGET: ${{ inputs.environment || 'staging' }}
2523

2624
jobs:
2725
build:
@@ -31,6 +29,11 @@ jobs:
3129

3230
runs-on: ubuntu-latest
3331

32+
env:
33+
ACCT: ${{ env.TARGET == 'production' && '990880627107' || '327995277200' }}
34+
BUCKET: ${{ env.TARGET == 'production' && 'tiny-cloud-antora-docs-release' || 'tiny-cloud-antora-docs-preview' }}
35+
RUN: run-${{ github.run_number }}-${{ github.run_attempt }}
36+
3437
defaults:
3538
run:
3639
shell: bash
@@ -62,8 +65,8 @@ jobs:
6265
- name: configure aws credentials
6366
uses: aws-actions/[email protected]
6467
with:
65-
role-to-assume: 'arn:aws:iam::${{ env.ACCT }}:role/${{ env.ENVNAME }}-tinymce-docs-update'
66-
role-session-name: tinymce-docs-${{ env.ENVNAME }}-release
68+
role-to-assume: 'arn:aws:iam::${{ env.ACCT }}:role/${{ env.TARGET }}-tinymce-docs-update'
69+
role-session-name: tinymce-docs-${{ env.TARGET }}-release
6770
aws-region: us-east-1
6871

6972
- name: Upload website preview to S3

0 commit comments

Comments
 (0)