Skip to content

Commit

Permalink
Fix homebrew repo authentication (#3781)
Browse files Browse the repository at this point in the history
The previous version of this workflow was doing something non-standard
with SSH keys that broke when we migrated it over to the RV org; this PR
fixes the breakage by using our standard `JENKINS_GITHUB_PAT`
authentication instead.

I have tested that this works by running the steps in isolation on a PR
branch (#3780) and I'm
reasonably confident this fix is correct.
  • Loading branch information
Baltoli authored Oct 31, 2023
1 parent cf7ae22 commit 885fe62
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,18 @@ jobs:
id: checkout
with:
repository: runtimeverification/homebrew-k
token: ${{ secrets.JENKINS_GITHUB_PAT }}
path: homebrew-k
ref: staging
persist-credentials: false
continue-on-error: true

- name: 'Check out homebrew repo master branch'
uses: actions/checkout@v3
if: ${{ steps.checkout.outcome == 'failure' }}
with:
repository: runtimeverification/homebrew-k
token: ${{ secrets.JENKINS_GITHUB_PAT }}
path: homebrew-k
persist-credentials: false

- name: 'Download bottle'
uses: actions/download-artifact@v2
Expand Down Expand Up @@ -300,19 +300,16 @@ jobs:
version=$(cat k-homebrew-checkout/package/version)
mv homebrew-k-old/${BOTTLE_NAME} homebrew-k-old/${REMOTE_BOTTLE_NAME}
gh release upload --repo runtimeverification/k --clobber v${version} homebrew-k-old/${REMOTE_BOTTLE_NAME}
# Deprecate After Homebrew tap migration
- name: 'Add ssh key'
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.HOMEBREW_SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_COM }}
- run: |
git config --global user.name rv-jenkins
git config --global user.email [email protected]
- name: 'Commit changes'
run: |
cp homebrew-k-old/Formula/kframework.rb homebrew-k/Formula/kframework.rb
cd homebrew-k
git commit -m 'Update brew package version' Formula/kframework.rb
git remote set-url origin [email protected]:runtimeverification/homebrew-k.git
git push origin master
- name: 'Delete Release'
Expand Down

0 comments on commit 885fe62

Please sign in to comment.