From 885fe620c87d5fecfbc75cfe02b63916698c05d7 Mon Sep 17 00:00:00 2001 From: Bruce Collie Date: Tue, 31 Oct 2023 15:24:49 +0000 Subject: [PATCH] Fix homebrew repo authentication (#3781) 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 (https://github.com/runtimeverification/k/pull/3780) and I'm reasonably confident this fix is correct. --- .github/workflows/release.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef00f0ce19e..bf86be01c72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -236,9 +236,9 @@ 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' @@ -246,8 +246,8 @@ jobs: 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 @@ -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 devops@runtimeverification.com - 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 git@github.com:runtimeverification/homebrew-k.git git push origin master - name: 'Delete Release'