|
| 1 | +name: Package |
| 2 | + |
1 | 3 | on:
|
2 | 4 | push:
|
3 | 5 | branches:
|
4 | 6 | - master
|
5 |
| - |
6 |
| -name: Package |
| 7 | + - v1-node16 |
7 | 8 |
|
8 | 9 | jobs:
|
9 |
| - check: |
10 |
| - name: Package distribution file |
| 10 | + package-v1: |
| 11 | + name: Package v1 dist files |
11 | 12 | runs-on: ubuntu-latest
|
12 | 13 | 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 |
| 14 | + - name: Configure AWS credentials |
| 15 | + uses: aws-actions/configure-aws-credentials@v1-node16 |
| 16 | + with: |
| 17 | + aws-region: us-west-2 |
| 18 | + aws-access-key-id: ${{ secrets.SECRETS_AWS_ACCESS_KEY_ID }} |
| 19 | + aws-secret-access-key: ${{ secrets.SECRETS_AWS_SECRET_ACCESS_KEY }} |
| 20 | + role-to-assume: ${{ secrets.SECRETS_AWS_ROLE_TO_ASSUME }} |
| 21 | + role-external-id: ${{ secrets.SECRETS_AWS_ROLE_EXTERNAL_ID }} |
| 22 | + role-duration-seconds: 300 |
| 23 | + role-session-name: SecretsManagerFetch |
| 24 | + - name: Get bot user token |
| 25 | + uses: aws-actions/aws-secretsmanager-get-secrets@v1 |
| 26 | + with: |
| 27 | + parse-json-secrets: true |
| 28 | + secret-ids: | |
| 29 | + OSDS,arn:aws:secretsmanager:us-west-2:294535624312:secret:github-aws-sdk-osds-automation-ZHNalp |
| 30 | + - name: Checkout |
| 31 | + uses: actions/checkout@v3 |
| 32 | + with: |
| 33 | + fetch-depth: 0 |
| 34 | + ref: ${{ github.ref_name }} |
| 35 | + token: ${{ env.OSDS_ACCESS-TOKEN }} |
| 36 | + - name: Package |
| 37 | + run: | |
| 38 | + npm ci |
| 39 | + npm test |
| 40 | + npm run package |
| 41 | + - name: Commit |
| 42 | + run: | |
| 43 | + echo "::add-mask::${OSDS_ACCESS-TOKEN}" |
| 44 | + git config --global user.name "GitHub Actions" |
| 45 | + git add dist/ |
| 46 | + git commit -m "chore: Update dist" || echo "No changes to commit" |
| 47 | + git push https://${OSDS_ACCESS-TOKEN}@github.com/aws-actions/configure-aws-credentials.git |
0 commit comments