-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix update-pr workflow #171
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -72,13 +72,13 @@ jobs: | |
- 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 ${{ env.BOT_EMAIL }} | ||
|
||
- name: Create homebrew PR | ||
run: | | ||
brew tap ${{ env.TAP }} | ||
brew update-reset | ||
brew bump-formula-pr --tag "${{ env.RELEASE_TAG }}" --revision "$GITHUB_SHA" ${{ env.TAP }}/${{ env.FORMULA }} --force | ||
brew bump-formula-pr --tag "${{ env.RELEASE_TAG }}" --revision "${{ github.sha }}" ${{ env.TAP }}/${{ env.FORMULA }} --force | ||
|
||
build-bottle: | ||
needs: homebrew-pr | ||
|
@@ -102,17 +102,15 @@ 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/${{ env.BOT_USER }}/homebrew-$(echo ${{ env.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: | | ||
brew tap ${{ env.TAP }} | ||
brew update-reset | ||
cd $(brew --repo ${{ env.TAP }}) | ||
git remote add fork-repo $FORK_REPO | ||
git remote add fork-repo ${{ env.FORK_REPO }} | ||
git fetch fork-repo | ||
git checkout -B bump-${{ env.FORMULA }}-${{ env.VERSION }} fork-repo/bump-${{ env.FORMULA }}-${{ env.VERSION }} | ||
|
||
|
@@ -123,7 +121,7 @@ jobs: | |
|
||
- name: Build bottle | ||
run: | | ||
brew test-bot --tap ${{ env.TAP }} --testing-formulae ${{ env.TAP }}/${{ env.FORMULA }} --only-formulae --root-url=https://github.com/$GITHUB_REPOSITORY/releases/download/${{ env.RELEASE_TAG }} | ||
brew test-bot --tap ${{ env.TAP }} --testing-formulae ${{ env.TAP }}/${{ env.FORMULA }} --only-formulae --root-url=https://github.com/${{ github.repository }}/releases/download/${{ env.RELEASE_TAG }} | ||
|
||
- name: Get Package Path | ||
id: get_package_path | ||
|
@@ -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,21 +168,19 @@ 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/${{ env.BOT_USER }}/homebrew-$(echo ${{ env.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 ${{ env.BOT_EMAIL }} | ||
|
||
- name: Checkout PR | ||
run: | | ||
brew tap ${{ env.TAP }} | ||
brew update-reset | ||
cd $(brew --repo ${{ env.TAP }}) | ||
git remote add fork-repo $FORK_REPO | ||
git remote add fork-repo ${{ env.FORK_REPO }} | ||
git fetch fork-repo | ||
git checkout -B bump-${{ env.FORMULA }}-${{ env.VERSION }} fork-repo/bump-${{ env.FORMULA }}-${{ env.VERSION }} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you confirmed this action gives no added value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't have this before, so that's why I am now removing it. I only added this in one of my many debugging attempts.