chore: update workflows

This commit is contained in:
peterwoodworth
2023-08-18 17:12:47 -07:00
parent 0f1923f1a1
commit 4403e8d882
7 changed files with 34 additions and 274 deletions
+19 -18
View File
@@ -1,10 +1,9 @@
name: Update dist files on target branch
name: Update dist files on main branch
on:
push:
branches:
- main
- v1-node16
paths-ignore:
- 'dist/**'
@@ -16,8 +15,19 @@ jobs:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
persist-credentials: false
- name: Package
run: |
npm ci
npm test
npm run package
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
uses: aws-actions/configure-aws-credentials@v3
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.SECRETS_AWS_ROLE_TO_ASSUME }}
@@ -29,21 +39,12 @@ jobs:
parse-json-secrets: true
secret-ids: |
OSDS,arn:aws:secretsmanager:us-west-2:294535624312:secret:github-aws-sdk-osds-automation-ZHNalp
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
token: ${{ env.OSDS_ACCESS_TOKEN }}
- name: Package
run: |
npm ci
npm test
npm run package
- name: Commit
run: |
echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}}"
git config --global user.name "GitHub Actions"
git add dist/
echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}"
git config user.name "GitHub Actions"
git config user.email "github-aws-sdk-osds-automation@amazon.com"
git remote set-url origin https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
git add dist
git commit -m "chore: Update dist" || echo "No changes to commit"
git push https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
git push origin