Skip to content

Commit d62f48e

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/multi-101ef0f0ce
2 parents 813e48b + 45fc56c commit d62f48e

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

.github/workflows/nightly-build.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,28 @@ jobs:
105105
if: always() && needs.update-dependencies.outputs.has_changes == 'true'
106106
runs-on: ubuntu-latest
107107
steps:
108+
- name: Configure AWS credentials for BOT secrets
109+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
110+
with:
111+
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
112+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
113+
114+
- name: Get Bot secrets
115+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
116+
id: bot_secrets
117+
with:
118+
secret-ids: |
119+
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
120+
parse-json-secrets: true
121+
108122
- name: Checkout repository
109123
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
110124
with:
111-
token: ${{ secrets.GITHUB_TOKEN }}
125+
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
112126

113127
- name: Create or update PR
128+
env:
129+
GITHUB_TOKEN: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
114130
run: |
115131
BUILD_STATUS="${{ needs.build-and-test.result }}"
116132
BUILD_EMOJI="${{ needs.build-and-test.result == 'success' && '✅' || '❌' }}"
@@ -142,8 +158,6 @@ jobs:
142158
--base main \
143159
--head "$BRANCH_NAME"
144160
fi
145-
env:
146-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147161
148162
publish-nightly-build-status:
149163
name: "Publish Nightly Build Status"

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313

1414
env:
1515
AWS_DEFAULT_REGION: us-east-1
16+
VERSION: ${{ github.event.inputs.version }}
17+
IS_PATCH: ${{ github.event.inputs.is_patch }}
1618

1719
permissions:
1820
id-token: write
@@ -31,8 +33,7 @@ jobs:
3133

3234
- name: Extract Major.Minor Version and setup Env variable
3335
run: |
34-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
35-
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
36+
echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
3637
3738
- name: Get current major.minor version from main branch
3839
id: get_version
@@ -89,8 +90,7 @@ jobs:
8990
9091
- name: Extract Major.Minor Version and setup Env variable
9192
run: |
92-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
93-
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
93+
echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
9494
9595
- name: Determine release branch and checkout
9696
run: |
@@ -105,17 +105,17 @@ jobs:
105105

106106
- name: Update version to next development version in main
107107
run: |
108-
DEV_VERSION="${{ github.event.inputs.version }}-dev0"
108+
DEV_VERSION="${{ env.VERSION }}-dev0"
109109
sed -i'' -e "s/\"version\": \".*\"/\"version\": \"${DEV_VERSION}\"/" aws-distro-opentelemetry-node-autoinstrumentation/package.json
110110
sed -i'' -e "s/\"version\": \".*\"/\"version\": \"${DEV_VERSION}\"/" docker-utils/package.json
111111
sed -i'' -e "s/\"version\": \".*\"/\"version\": \"${DEV_VERSION}\"/" package.json
112112
sed -i'' -e "s/aws-aws-distro-opentelemetry-node-autoinstrumentation-[0-9]\+\.[0-9]\+\.[0-9]\+\([0-9A-Za-z-]\+\)\?\.tgz/aws-aws-distro-opentelemetry-node-autoinstrumentation-${DEV_VERSION}.tgz/" lambda-layer/packages/layer/package.json
113-
VERSION="${{ github.event.inputs.version }}"
113+
VERSION="${{ env.VERSION }}"
114114
npm install
115-
sed -i "s|\(/aws-observability/adot-autoinstrumentation-node:\)v[0-9]\+\.[0-9]\+\.[0-9]\+|\1v${{github.event.inputs.version}}|g" .github/workflows/daily-scan.yml
115+
sed -i "s|\(/aws-observability/adot-autoinstrumentation-node:\)v[0-9]\+\.[0-9]\+\.[0-9]\+|\1v${{ env.VERSION }}|g" .github/workflows/daily-scan.yml
116116
117117
# for patch releases, avoid merge conflict by manually resolving CHANGELOG with main
118-
if [[ "${{ github.event.inputs.is_patch }}" == "true" ]]; then
118+
if [[ "${{ env.IS_PATCH }}" == "true" ]]; then
119119
# Copy the patch release entries
120120
sed -n "/^## v${VERSION}/,/^## v[0-9]/p" CHANGELOG.md | sed '$d' > /tmp/patch_release_section.txt
121121
git fetch origin main
@@ -133,7 +133,7 @@ jobs:
133133
env:
134134
GITHUB_TOKEN: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
135135
run: |
136-
DEV_VERSION="${{ github.event.inputs.version }}-dev0"
136+
DEV_VERSION="${{ env.VERSION }}-dev0"
137137
gh pr create --title "Post release $VERSION: Update version to $DEV_VERSION" \
138138
--body "This PR prepares the main branch for the next development cycle by updating the version to $DEV_VERSION and updating the image version to be scanned to the latest released.
139139
@@ -151,4 +151,4 @@ jobs:
151151
if ! git diff --quiet --cached; then
152152
git commit -m "Force our CHANGELOG to override merge conflicts"
153153
git push origin "prepare-main-for-next-dev-cycle-${VERSION}"
154-
fi
154+
fi

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313

1414
env:
1515
AWS_DEFAULT_REGION: us-east-1
16+
VERSION: ${{ github.event.inputs.version }}
17+
IS_PATCH: ${{ github.event.inputs.is_patch }}
1618

1719
permissions:
1820
contents: write
@@ -51,12 +53,11 @@ jobs:
5153
5254
- name: Extract Major.Minor Version and setup Env variable
5355
run: |
54-
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
55-
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
56+
echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
5657
5758
- name: Create branches
5859
run: |
59-
IS_PATCH=${{ github.event.inputs.is_patch }}
60+
IS_PATCH=${{ env.IS_PATCH }}
6061
if [[ "$IS_PATCH" != "true" && "$IS_PATCH" != "false" ]]; then
6162
echo "Invalid input for IS_PATCH. Must be 'true' or 'false'."
6263
exit 1
@@ -118,5 +119,5 @@ jobs:
118119
--body "This PR updates the version to ${VERSION}.
119120
120121
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice." \
121-
--head v${{ github.event.inputs.version }}_release \
122-
--base release/v${MAJOR_MINOR}.x
122+
--head v${{ env.VERSION }}_release \
123+
--base release/v${MAJOR_MINOR}.x

package-lock.json

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)