@@ -90,31 +90,41 @@ jobs:
9090 GPG_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
9191 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9292 ORG_GITHUB_TOKEN : ${{ secrets.ORG_GITHUB_TOKEN }}
93- - name : Checkout
94- uses : actions/checkout@v4
95- with :
96- repository : OpsLevel/homebrew-tap
97- token : ${{ secrets.ORG_GITHUB_TOKEN }}
98- path : homebrew-tap
99- - name : Update homebrew
100- working-directory : homebrew-tap
101- env :
102- GORELEASER_ARTIFACTS : " ${{ steps.goreleaser.outputs.artifacts }}"
103- run : |
104- RELEASE_SHA256=$(echo $GORELEASER_ARTIFACTS | jq -r '.[] | select(.type == "Archive") | .extra.Checksum | split(":")[1]')
105- [ -z "$RELEASE_SHA256" ] && exit 1
106- cd Formula
107- awk -v ver="${RELEASE_VERSION:1}" '/version/, /ldflags/ {sub(/[0-9]+\.[0-9]+\.[0-9]+/, ver)} {print}' kubectl.rb > tmp.txt
108- awk -v new_sha="${RELEASE_SHA256}" \
109- -v new_commit="${GITHUB_SHA::12}" \
110- '/commit/ {sub(/[0-9a-f]{12}/, new_commit)} /sha256/ {sub(/[0-9a-f]{10}+/, new_sha)} {print}' \
111- tmp.txt > kubectl.rb
112- rm tmp.txt
113- git config user.name "OpsLevel Bots"
114- git config user.email "bots@opslevel.com"
115- git add .
116- git commit -m "Brew formula update for kubectl-opslevel version $RELEASE_VERSION"
117- git push -f origin HEAD
93+ # - name: Checkout
94+ # uses: actions/checkout@v4
95+ # with:
96+ # repository: OpsLevel/homebrew-tap
97+ # token: ${{ secrets.ORG_GITHUB_TOKEN }}
98+ # path: homebrew-tap
99+ # - name: Update homebrew
100+ # working-directory: homebrew-tap
101+ # run: |
102+ # cd Formula
103+ # awk -v ver="${RELEASE_VERSION:1}" '/version/ {sub(/[0-9]+\.[0-9]+\.[0-9]+/, ver)} {print}' kubectl.rb > tmp.txt
104+ # awk -v full_sha="${GITHUB_SHA}" \
105+ # -v short_sha="${GITHUB_SHA::12}" \
106+ # '/commit/ {sub(/[0-9a-f]{12}/, short_sha)} /revision/ {sub(/[0-9a-f]{10}+/, full_sha)} {print}' \
107+ # tmp.txt > kubectl.rb
108+ # rm tmp.txt
109+ # git config user.name "OpsLevel Bots"
110+ # git config user.email "bots@opslevel.com"
111+ # git add .
112+ # git commit -m "Brew formula update for kubectl-opslevel version $RELEASE_VERSION"
113+ # git push -f origin HEAD
114+ # - name: Update homebrew
115+ # env:
116+ # HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }}
117+ # run: >
118+ # brew tap opslevel/tap &&
119+ # brew bump-formula-pr
120+ # --verbose
121+ # --no-audit
122+ # --no-browse
123+ # --write-only
124+ # --message="Brew formula update for kubectl-opslevel version $RELEASE_VERSION"
125+ # --version="$RELEASE_VERSION"
126+ # --revision="${GITHUB_SHA}"
127+ # opslevel/tap/kubectl
118128
119129 release-docker :
120130 runs-on : ubuntu-latest
0 commit comments