Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aws-actions/configure-aws-credentials
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.2
Choose a base ref
...
head repository: aws-actions/configure-aws-credentials
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 26,564 additions and 21,167 deletions.
  1. +0 −2 .eslintignore
  2. +0 −168 .eslintrc.yml
  3. +8 −0 .github/ISSUE_TEMPLATE/bug-report.yml
  4. +32 −0 .github/workflows/automerge-approved-prs.yml
  5. +20 −0 .github/workflows/cawsc-test.yml
  6. +1 −1 .github/workflows/close-stale-issues.yml
  7. +37 −0 .github/workflows/dependabot-autoapprove.yml
  8. +32 −0 .github/workflows/issue-regression-labeler.yml
  9. +3 −3 .github/workflows/{package.yml → package-dist.yml}
  10. +1 −1 .github/workflows/pull-request-lint.yml
  11. +43 −0 .github/workflows/release-please.yml
  12. +5 −5 .github/workflows/tests-integ.yml
  13. +4 −4 .github/workflows/tests-unit.yml
  14. +0 −46 .mergify.yml
  15. +0 −8 .prettierrc.json
  16. +5 −0 .release-please-manifest.json
  17. +38 −0 CHANGELOG.md
  18. +212 −203 README.md
  19. +2 −0 __mocks__/fs.cjs
  20. +2 −0 action.yml
  21. +34 −0 biome.jsonc
  22. +14 −0 dist/cleanup/CredentialsClient.d.ts
  23. +17 −0 dist/cleanup/assumeRole.d.ts
  24. +11 −0 dist/cleanup/cleanup/index.d.ts
  25. +17 −0 dist/cleanup/helpers.d.ts
  26. +1 −0 dist/cleanup/index.d.ts
  27. +10,143 −5,888 dist/cleanup/index.js
  28. +3 −1 dist/cleanup/src/assumeRole.d.ts
  29. +74 −0 dist/cleanup/test/mockinputs.test.d.ts
  30. +10,288 −5,977 dist/index.js
  31. +1 −1 examples/cfn-deploy-example/.github/workflows/compliance.yml
  32. +2 −2 examples/cfn-deploy-example/.github/workflows/deploy.yml
  33. +4,929 −7,892 package-lock.json
  34. +22 −32 package.json
  35. +13 −0 release-please-config.json
  36. +3 −2 src/CredentialsClient.ts
  37. +19 −15 src/assumeRole.ts
  38. +17 −3 src/helpers.ts
  39. +44 −22 src/index.ts
  40. +29 −33 test/cleanup.test.ts
  41. +35 −16 test/helpers.test.ts
  42. +273 −828 test/index.test.ts
  43. +103 −0 test/mockinputs.test.ts
  44. +0 −9 tsconfig.build.json
  45. +6 −5 tsconfig.json
  46. +11 −0 tsconfig.test.json
  47. +10 −0 vitest.config.mts
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

168 changes: 0 additions & 168 deletions .eslintrc.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,14 @@ body:
description: What is the problem? A clear and concise description of the bug.
validations:
required: true
- type: checkboxes
id: regression
attributes:
label: Regression Issue
description: What is a regression? If it worked in a previous version but doesn't in the latest version, it's considered a regression. In this case, please provide specific version number in the report.
options:
- label: Select this option if this issue appears to be a regression.
required: false
- type: textarea
id: expected
attributes:
32 changes: 32 additions & 0 deletions .github/workflows/automerge-approved-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
pull_request_review:
types: submitted

jobs:
approved_pr:
name: Automerge approved PRs
permissions:
contents: write
pull-requests: write
id-token: write
if: ${{ github.event.review.state == 'approved' && github.repository == 'aws-actions/configure-aws-credentials' && (github.event.review.author_association == 'OWNER' || github.event.review.author_association == 'MEMBER' || github.event.review.user.login == 'aws-sdk-osds') }}
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
role-duration-seconds: 900
role-session-name: SecretsManagerFetch
- name: Get bot user token
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
parse-json-secrets: true
secret-ids: |
OSDS,arn:aws:secretsmanager:us-west-2:206735643321:secret:github-aws-sdk-osds-automation-gebs9n
- name: Enable PR automerge
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ env.OSDS_ACCESS_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/cawsc-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test Configure AWS Credential
on:
workflow_dispatch:

jobs:
cawsc:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: CAWSC
uses: aws-actions/configure-aws-credentials@main
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
role-duration-seconds: 900
role-session-name: TestCAWSC
- name: Whoami
run: |
aws sts get-caller-identity
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
name: Stale issue job
steps:
- uses: aws-actions/stale-issue-cleanup@v5
- uses: aws-actions/stale-issue-cleanup@v6
with:
# Setting messages to an empty string will cause the automation to skip
# that category
37 changes: 37 additions & 0 deletions .github/workflows/dependabot-autoapprove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Dependabot auto-approve
on: pull_request
permissions:
pull-requests: write
id-token: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'aws-actions/configure-aws-credentials' }}
steps:
- name: Get Metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
- uses: actions/checkout@v4
name: Clone repo
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
role-duration-seconds: 900
- name: Get bot user token
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
parse-json-secrets: true
secret-ids: |
OSDS,arn:aws:secretsmanager:us-west-2:206735643321:secret:github-aws-sdk-osds-automation-gebs9n
- name: Approve PR if not already approved
run: |
gh pr checkout "$PR_URL"
if [ "$(gh pr status --json reviewDecision - q .currentBranch.reviewDecision)" != "APPROVED" ]; then
gh pr review "$PR_URL" --approve
else echo "PR already approved"
fi
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ env.OSDS_ACCESS_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/issue-regression-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Apply potential regression label on issues
name: issue-regression-label
on:
issues:
types: [opened, edited]
jobs:
add-regression-label:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Fetch template body
id: check_regression
uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEMPLATE_BODY: ${{ github.event.issue.body }}
with:
script: |
const regressionPattern = /\[x\] Select this option if this issue appears to be a regression\./i;
const template = `${process.env.TEMPLATE_BODY}`
const match = regressionPattern.test(template);
core.setOutput('is_regression', match);
- name: Manage regression label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ steps.check_regression.outputs.is_regression }}" == "true" ]; then
gh issue edit ${{ github.event.issue.number }} --add-label "potential-regression" -R ${{ github.repository }}
else
gh issue edit ${{ github.event.issue.number }} --remove-label "potential-regression" -R ${{ github.repository }}
fi
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
@@ -35,7 +35,7 @@ jobs:
role-duration-seconds: 900
role-session-name: SecretsManagerFetch
- name: Get bot user token
uses: aws-actions/aws-secretsmanager-get-secrets@v1
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
parse-json-secrets: true
secret-ids: |
@@ -48,4 +48,4 @@ jobs:
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 origin
git push --force origin
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-lint.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: amannn/action-semantic-pull-request@v4.5.0
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
43 changes: 43 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Release Please
on:
push:
branches:
- main

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
role-duration-seconds: 900
role-session-name: ${{ github.run_id }}

- name: Get git credentials
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
parse-json-secrets: true
secret-ids: |
OSDS,arn:aws:secretsmanager:us-west-2:206735643321:secret:github-aws-sdk-osds-automation-gebs9n
- name: Run release-please
uses: googleapis/release-please-action@v4
with:
release-type: node
token: ${{ env.OSDS_ACCESS_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
Loading