Skip to content

Commit f201770

Browse files
committed
Revert "use github token for fork testing"
This reverts commit 3775cea.
1 parent 3775cea commit f201770

File tree

2 files changed

+31
-32
lines changed

2 files changed

+31
-32
lines changed

.github/workflows/post-release-version-bump.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ permissions:
1414
id-token: write
1515
contents: write
1616
pull-requests: write
17-
actions: write
1817

1918
jobs:
2019
check-version:
@@ -59,25 +58,25 @@ jobs:
5958
runs-on: ubuntu-latest
6059
needs: check-version
6160
steps:
62-
# - name: Configure AWS credentials for BOT secrets
63-
# uses: aws-actions/configure-aws-credentials@v4
64-
# with:
65-
# role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
66-
# aws-region: ${{ env.AWS_DEFAULT_REGION }}
67-
#
68-
# - name: Get Bot secrets
69-
# uses: aws-actions/aws-secretsmanager-get-secrets@v1
70-
# id: bot_secrets
71-
# with:
72-
# secret-ids: |
73-
# BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
74-
# parse-json-secrets: true
61+
- name: Configure AWS credentials for BOT secrets
62+
uses: aws-actions/configure-aws-credentials@v4
63+
with:
64+
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
65+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
66+
67+
- name: Get Bot secrets
68+
uses: aws-actions/aws-secretsmanager-get-secrets@v1
69+
id: bot_secrets
70+
with:
71+
secret-ids: |
72+
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
73+
parse-json-secrets: true
7574

7675
- name: Setup Git
7776
uses: actions/checkout@v2
7877
with:
7978
fetch-depth: 0
80-
token: ${{ secrets.GITHUB_TOKEN }}
79+
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
8180

8281
- name: Configure Git
8382
run: |
@@ -100,15 +99,15 @@ jobs:
10099
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
101100
sed -i'' -e "s/val adotVersion = \".*\"/val adotVersion = \"${DEV_VERSION}\"/" version.gradle.kts
102101
VERSION="${{ github.event.inputs.version }}"
103-
sed -i'' -e 's/adot-autoinstrumentation-java:v2.*"/adot-autoinstrumentation-java:v'$VERSION'"/' .github/workflows/daily-scan.yml
102+
sed -i'' -e 's/adot-autoinstrumentation-java:v2\.[0-9]+\.[0-9]+/adot-autoinstrumentation-java:v'$VERSION'/g' .github/workflows/daily-scan.yml
104103
git add version.gradle.kts
105104
git add .github/workflows/daily-scan.yml
106105
git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
107106
git push --set-upstream origin "prepare-main-for-next-dev-cycle-${VERSION}"
108107
109108
- name: Create Pull Request to main
110109
env:
111-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110+
GITHUB_TOKEN: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
112111
run: |
113112
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
114113
gh pr create --title "Post release $VERSION: Update version to $DEV_VERSION" \

.github/workflows/pre-release-prepare.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ jobs:
2424
update-version-and-create-pr:
2525
runs-on: ubuntu-latest
2626
steps:
27-
# - name: Configure AWS credentials for BOT secrets
28-
# uses: aws-actions/configure-aws-credentials@v4
29-
# with:
30-
# role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
31-
# aws-region: ${{ env.AWS_DEFAULT_REGION }}
32-
#
33-
# - name: Get Bot secrets
34-
# uses: aws-actions/aws-secretsmanager-get-secrets@v1
35-
# id: bot_secrets
36-
# with:
37-
# secret-ids: |
38-
# BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
39-
# parse-json-secrets: true
27+
- name: Configure AWS credentials for BOT secrets
28+
uses: aws-actions/configure-aws-credentials@v4
29+
with:
30+
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
31+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
32+
33+
- name: Get Bot secrets
34+
uses: aws-actions/aws-secretsmanager-get-secrets@v1
35+
id: bot_secrets
36+
with:
37+
secret-ids: |
38+
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
39+
parse-json-secrets: true
4040

4141
- name: Checkout main branch
4242
uses: actions/checkout@v3
4343
with:
4444
ref: 'main'
45-
token: ${{ secrets.GITHUB_TOKEN }}
45+
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
4646

4747
- name: Setup Git
4848
run: |
@@ -96,7 +96,7 @@ jobs:
9696
9797
- name: Create pull request against the release branch
9898
env:
99-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
GITHUB_TOKEN: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
100100
run: |
101101
gh pr create --title "Pre-release: Update version to ${VERSION}" \
102102
--body "This PR updates the version to ${VERSION}.

0 commit comments

Comments
 (0)