File tree 1 file changed +41
-19
lines changed
1 file changed +41
-19
lines changed Original file line number Diff line number Diff line change
1
+ name : Update dist files on
2
+
1
3
on :
2
4
push :
3
5
branches :
4
6
- master
5
-
6
- name : Package
7
+ - v1-node16
8
+ paths-ignore :
9
+ - ' dist/**'
7
10
8
11
jobs :
9
- check :
10
- name : Package distribution file
12
+ package :
13
+ name : Package dist files
11
14
runs-on : ubuntu-latest
15
+ permissions :
16
+ id-token : write
17
+ contents : read
12
18
steps :
13
- - name : Checkout
14
- uses : actions/checkout@v2
15
- with :
16
- ref : master
17
- - name : Package
18
- run : |
19
- npm ci
20
- npm test
21
- npm run package
22
- - name : Commit
23
- run : |
24
- git config --global user.name "GitHub Actions"
25
- git add dist/
26
- git commit -m "chore: Update dist" || echo "No changes to commit"
27
- git push origin HEAD:master
19
+ - name : Configure AWS credentials
20
+ uses : aws-actions/configure-aws-credentials@v1-node16
21
+ with :
22
+ aws-region : us-west-2
23
+ role-to-assume : ${{ secrets.SECRETS_AWS_ROLE_TO_ASSUME }}
24
+ role-duration-seconds : 900
25
+ role-session-name : SecretsManagerFetch
26
+ - name : Get bot user token
27
+ uses : aws-actions/aws-secretsmanager-get-secrets@v1
28
+ with :
29
+ parse-json-secrets : true
30
+ secret-ids : |
31
+ OSDS,arn:aws:secretsmanager:us-west-2:294535624312:secret:github-aws-sdk-osds-automation-ZHNalp
32
+ - name : Checkout
33
+ uses : actions/checkout@v3
34
+ with :
35
+ fetch-depth : 0
36
+ ref : ${{ github.ref_name }}
37
+ token : ${{ env.OSDS_ACCESS_TOKEN }}
38
+ - name : Package
39
+ run : |
40
+ npm ci
41
+ npm test
42
+ npm run package
43
+ - name : Commit
44
+ run : |
45
+ echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}}"
46
+ git config --global user.name "GitHub Actions"
47
+ git add dist/
48
+ git commit -m "chore: Update dist" || echo "No changes to commit"
49
+ git push https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
You can’t perform that action at this time.
0 commit comments