File tree Expand file tree Collapse file tree 2 files changed +41
-14
lines changed Expand file tree Collapse file tree 2 files changed +41
-14
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,3 @@ jobs:
156156 asset_path : pvsadm-binaries.tar.gz
157157 asset_name : pvsadm-binaries.tar.gz
158158 asset_content_type : application/tar+gzip
159-
160- - name : Update Homebrew formula
161- env :
162- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN}}
163- GH_TOKEN : ${{ secrets.GITHUB_TOKEN}}
164- run : |
165- git config --global user.name "pvsadm GitHub Actions"
166- git config --global user.email "[email protected] " 167- GET_VERSION_OUTPUT="${{ steps.get_version.outputs.VERSION }}"
168- NEW_VERSION=${GET_VERSION_OUTPUT#v}
169- BASE_REPO_URL="https://github.com/${GITHUB_REPOSITORY}"
170- BREW_TAP_REPO_URL="https://github.com/ppc64le-cloud/homebrew-pvsadm"
171- FORMULA_FILE="pvsadm.rb"
172- ./ci/brew_formula_updater.sh "$BASE_REPO_URL" "$NEW_VERSION" "$BREW_TAP_REPO_URL" "$FORMULA_FILE"
Original file line number Diff line number Diff line change 1+ name : Update Homebrew Formula on Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ update-homebrew :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v4
14+
15+ - name : Get GitHub App User ID and setup the git environment
16+ id : get-user-id
17+ run : echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
18+ env :
19+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
20+ - run : |
21+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
22+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
23+
24+ - name : Generate GitHub App Token
25+ uses : actions/create-github-app-token@v1
26+ id : app-token
27+ with :
28+ app-id : ${{ vars.APP_ID }}
29+ private-key : ${{ secrets.PRIVATE_KEY }}
30+ owner : ${{ github.repository_owner }}
31+
32+ - name : Update Homebrew formula
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN}}
35+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
36+ run : |
37+ RELEASE_VERSION=${{ github.event.release.tag_name#v }}
38+ BASE_REPO_URL="https://github.com/${GITHUB_REPOSITORY}"
39+ BREW_TAP_REPO_URL="https://github.com/ppc64le-cloud/homebrew-pvsadm"
40+ FORMULA_FILE="pvsadm.rb"
41+ ./ci/brew_formula_updater.sh "$BASE_REPO_URL" "$RELEASE_VERSION" "$BREW_TAP_REPO_URL" "$FORMULA_FILE"
You can’t perform that action at this time.
0 commit comments