-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We cannot rely on values in GITHUB_ENV that were stored earlier in the same step. Instead, directly query secretsmanager as needed. Also fixes the committer-email that used the literal `BOT_EMAIL` string rather than the variable.
- Loading branch information
1 parent
a35eb35
commit 876138b
Showing
1 changed file
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,10 +102,8 @@ jobs: | |
|
||
- name: Fetch secrets | ||
run: | | ||
echo "BOT_EMAIL=$(aws secretsmanager get-secret-value --secret-id BOT_EMAIL | jq -r '.SecretString')" >> $GITHUB_ENV | ||
echo "HOMEBREW_GITHUB_API_TOKEN=$(aws secretsmanager get-secret-value --secret-id RELEASE_CI_ACCESS_TOKEN | jq -r '.SecretString')" >> $GITHUB_ENV | ||
echo "FORK_REPO=https://[email protected]/$BOT_USER/homebrew-$(echo $TAP |cut -d / -f 2).git" >> $GITHUB_ENV | ||
echo "GITHUB_TOKEN=$HOMEBREW_GITHUB_API_TOKEN" >> $GITHUB_ENV | ||
echo "FORK_REPO=https://$(aws secretsmanager get-secret-value --secret-id RELEASE_CI_ACCESS_TOKEN | jq -r '.SecretString')@github.com/$BOT_USER/homebrew-$(echo $TAP |cut -d / -f 2).git" >> $GITHUB_ENV | ||
echo "GITHUB_TOKEN=$(aws secretsmanager get-secret-value --secret-id RELEASE_CI_ACCESS_TOKEN | jq -r '.SecretString')" >> $GITHUB_ENV | ||
- name: Checkout PR | ||
run: | | ||
|
@@ -161,10 +159,6 @@ jobs: | |
with: | ||
pattern: bottle-* | ||
|
||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
- name: Authenticate GitHub workflow to AWS | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
|
@@ -174,14 +168,12 @@ jobs: | |
- name: Fetch secrets | ||
run: | | ||
echo "BOT_EMAIL=$(aws secretsmanager get-secret-value --secret-id BOT_EMAIL | jq -r '.SecretString')" >> $GITHUB_ENV | ||
echo "HOMEBREW_GITHUB_API_TOKEN=$(aws secretsmanager get-secret-value --secret-id RELEASE_CI_ACCESS_TOKEN | jq -r '.SecretString')" >> $GITHUB_ENV | ||
echo "FORK_REPO=https://[email protected]/$BOT_USER/homebrew-$(echo $TAP |cut -d / -f 2).git" >> $GITHUB_ENV | ||
echo "GITHUB_TOKEN=$HOMEBREW_GITHUB_API_TOKEN" >> $GITHUB_ENV | ||
echo "FORK_REPO=https://$(aws secretsmanager get-secret-value --secret-id RELEASE_CI_ACCESS_TOKEN | jq -r '.SecretString')@github.com/$BOT_USER/homebrew-$(echo $TAP |cut -d / -f 2).git" >> $GITHUB_ENV | ||
- name: Configure git user name and email | ||
run: | | ||
git config --global user.name ${{ env.BOT_USER }} | ||
git config --global user.email BOT_EMAIL | ||
git config --global user.email $BOT_EMAIL | ||
- name: Checkout PR | ||
run: | | ||
|