Skip to content

Commit a31e903

Browse files
authored
Merge branch 'main' into remove-integ
2 parents b88116b + 68858db commit a31e903

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+38814
-36723
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 0 additions & 168 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ body:
1212
description: What is the problem? A clear and concise description of the bug.
1313
validations:
1414
required: true
15+
- type: checkboxes
16+
id: regression
17+
attributes:
18+
label: Regression Issue
19+
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.
20+
options:
21+
- label: Select this option if this issue appears to be a regression.
22+
required: false
1523
- type: textarea
1624
id: expected
1725
attributes:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
pull_request_review:
3+
types: submitted
4+
5+
jobs:
6+
approved_pr:
7+
name: Automerge approved PRs
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
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') }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Configure AWS credentials
16+
uses: aws-actions/configure-aws-credentials@v4
17+
with:
18+
aws-region: us-west-2
19+
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
20+
role-duration-seconds: 900
21+
role-session-name: SecretsManagerFetch
22+
- name: Get bot user token
23+
uses: aws-actions/aws-secretsmanager-get-secrets@v2
24+
with:
25+
parse-json-secrets: true
26+
secret-ids: |
27+
${{ secrets.OSDS_PACKAGING_ROLE }}
28+
- name: Enable PR automerge
29+
run: gh pr merge --auto --squash "$PR_URL"
30+
env:
31+
PR_URL: ${{ github.event.pull_request.html_url }}
32+
GITHUB_TOKEN: ${{ env.OSDS_ACCESS_TOKEN }}

.github/workflows/cawsc-test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test Configure AWS Credential
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
cawsc:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
id-token: write
10+
steps:
11+
- name: CAWSC
12+
uses: aws-actions/configure-aws-credentials@main
13+
with:
14+
aws-region: us-west-2
15+
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
16+
role-duration-seconds: 900
17+
role-session-name: TestCAWSC
18+
- name: Whoami
19+
run: |
20+
aws sts get-caller-identity
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Dependabot auto-approve
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
permissions:
7+
pull-requests: write
8+
id-token: write
9+
contents: read
10+
jobs:
11+
dependabot:
12+
runs-on: ubuntu-latest
13+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'aws-actions/configure-aws-credentials' }}
14+
steps:
15+
- name: Get Metadata
16+
id: dependabot-metadata
17+
uses: dependabot/fetch-metadata@v2
18+
- uses: actions/checkout@v4
19+
name: Clone repo
20+
- name: Configure AWS credentials
21+
uses: aws-actions/configure-aws-credentials@v4
22+
with:
23+
aws-region: us-west-2
24+
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
25+
role-duration-seconds: 900
26+
- name: Get bot user token
27+
uses: aws-actions/aws-secretsmanager-get-secrets@v2
28+
with:
29+
parse-json-secrets: true
30+
secret-ids: |
31+
${{ secrets.OSDS_PACKAGING_ROLE }}
32+
- name: Approve PR if not already approved
33+
run: |
34+
gh pr checkout "$PR_URL"
35+
if [ "$(gh pr status --json reviewDecision - q .currentBranch.reviewDecision)" != "APPROVED" ]; then
36+
gh pr review "$PR_URL" --approve
37+
else echo "PR already approved"
38+
fi
39+
env:
40+
PR_URL: ${{ github.event.pull_request.html_url }}
41+
GITHUB_TOKEN: ${{ env.OSDS_ACCESS_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Apply potential regression label on issues
2+
name: issue-regression-label
3+
on:
4+
issues:
5+
types: [opened, edited]
6+
jobs:
7+
add-regression-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
steps:
12+
- name: Fetch template body
13+
id: check_regression
14+
uses: actions/github-script@v7
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
TEMPLATE_BODY: ${{ github.event.issue.body }}
18+
with:
19+
script: |
20+
const regressionPattern = /\[x\] Select this option if this issue appears to be a regression\./i;
21+
const template = `${process.env.TEMPLATE_BODY}`
22+
const match = regressionPattern.test(template);
23+
core.setOutput('is_regression', match);
24+
- name: Manage regression label
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
if [ "${{ steps.check_regression.outputs.is_regression }}" == "true" ]; then
29+
gh issue edit ${{ github.event.issue.number }} --add-label "potential-regression" -R ${{ github.repository }}
30+
else
31+
gh issue edit ${{ github.event.issue.number }} --remove-label "potential-regression" -R ${{ github.repository }}
32+
fi

.github/workflows/package.yml renamed to .github/workflows/package-dist.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
parse-json-secrets: true
4141
secret-ids: |
42-
OSDS,arn:aws:secretsmanager:us-west-2:206735643321:secret:github-aws-sdk-osds-automation-gebs9n
42+
${{ secrets.OSDS_PACKAGING_ROLE }}
4343
- name: Commit
4444
run: |
4545
echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}"
@@ -48,4 +48,4 @@ jobs:
4848
git remote set-url origin https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
4949
git add dist
5050
git commit -m "chore: Update dist" || echo "No changes to commit"
51-
git push origin
51+
git push --force origin

.github/workflows/release-please.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Release Please
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
id-token: write
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Configure AWS Credentials
23+
uses: aws-actions/configure-aws-credentials@v4
24+
with:
25+
aws-region: us-west-2
26+
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
27+
role-duration-seconds: 900
28+
role-session-name: ${{ github.run_id }}
29+
30+
- name: Get git credentials
31+
uses: aws-actions/aws-secretsmanager-get-secrets@v2
32+
with:
33+
parse-json-secrets: true
34+
secret-ids: |
35+
${{ secrets.OSDS_PACKAGING_ROLE }}
36+
37+
- name: Run release-please
38+
uses: googleapis/release-please-action@v4
39+
with:
40+
release-type: node
41+
token: ${{ env.OSDS_ACCESS_TOKEN }}
42+
config-file: release-please-config.json
43+
manifest-file: .release-please-manifest.json

0 commit comments

Comments
 (0)