File tree 5 files changed +33
-81
lines changed
5 files changed +33
-81
lines changed Original file line number Diff line number Diff line change 39
39
# Needed as recommended by npm docs on publishing with provenance https://docs.npmjs.com/generating-provenance-statements
40
40
permissions :
41
41
id-token : write
42
- contents : write
43
42
environment : Release
44
43
runs-on : ubuntu-latest
45
44
outputs :
98
97
id-token : write
99
98
contents : write
100
99
pages : write
100
+ pull-requests : write
101
101
uses : ./.github/workflows/publish_layer.yml
102
102
with :
103
103
latest_published_version : ${{ needs.publish-npm.outputs.RELEASE_VERSION }}
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ name: Make Version
3
3
on :
4
4
workflow_dispatch : { }
5
5
6
+ permissions :
7
+ contents : read
8
+
6
9
7
10
jobs :
8
11
bump-version :
Original file line number Diff line number Diff line change @@ -78,29 +78,36 @@ jobs:
78
78
secrets :
79
79
target-account-role : ${{ secrets.AWS_LAYERS_PROD_ROLE_ARN }}
80
80
81
- prepare_docs_alias :
81
+ update_layer_arn_docs :
82
+ needs : [deploy-prod]
83
+ # Force Github action to run only a single job at a time (based on the group name)
84
+ # This is to prevent race-condition and inconsistencies with changelog push
85
+ concurrency :
86
+ group : changelog-build
82
87
runs-on : ubuntu-latest
83
88
permissions :
84
- contents : read
85
- outputs :
86
- DOCS_ALIAS : ${{ steps.set-alias.outputs.DOCS_ALIAS }}
89
+ contents : write
90
+ pull-requests : write
91
+ id-token : none
87
92
steps :
88
- - name : Set docs alias
89
- id : set-alias
93
+ - name : Checkout repository # reusable workflows start clean, so we need to checkout again
94
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
95
+ with :
96
+ ref : ${{ github.sha }}
97
+ - name : Download CDK layer artifact
98
+ uses : actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
99
+ with :
100
+ name : cdk-layer-stack
101
+ path : cdk-layer-stack/
102
+ - name : Replace layer versions in documentation
90
103
run : |
91
- DOCS_ALIAS=latest
92
- if [[ "${{ inputs.pre_release }}" == true ]] ; then
93
- DOCS_ALIAS=alpha
94
- fi
95
- echo DOCS_ALIAS="$DOCS_ALIAS" >> "$GITHUB_OUTPUT"
96
-
97
- release-docs :
98
- needs : [ deploy-prod, prepare_docs_alias ]
99
- permissions :
100
- id-token : write
101
- secrets : inherit
102
- uses : ./.github/workflows/reusable_publish_docs.yml
103
- with :
104
- version : ${{ inputs.latest_published_version }}
105
- alias : ${{ needs.prepare_docs_alias.outputs.DOCS_ALIAS }}
106
- detached_mode : true
104
+ ls -la cdk-layer-stack/
105
+ ./.github/scripts/update_layer_arn.sh cdk-layer-stack
106
+ - name : Create PR
107
+ id : create-pr
108
+ uses : ./.github/actions/create-pr
109
+ with :
110
+ files : ' docs/index.md'
111
+ temp_branch_prefix : ' ci-layer-docs'
112
+ pull_request_title : ' chore(ci): update layer ARN on documentation'
113
+ github_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -100,11 +100,3 @@ jobs:
100
100
overwrite : true
101
101
- name : CDK deploy canary
102
102
run : npm run cdk -w layers -- deploy --app cdk.out --context region=${{ matrix.region }} 'CanaryStack' --require-approval never --verbose --outputs-file cdk-outputs.json
103
- update_layer_arn_docs :
104
- needs : deploy-cdk-stack
105
- permissions :
106
- contents : write
107
- if : ${{ inputs.stage == 'PROD' }}
108
- uses : ./.github/workflows/reusable_update_layer_arn_docs.yml
109
- with :
110
- latest_published_version : ${{ inputs.latest_published_version }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments