Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update consul-template to 0.41.2 #1208

Update consul-template to 0.41.2

Update consul-template to 0.41.2 #1208

name: Update Product Formula in Tap
run-name: Update ${{ github.event.client_payload.name }} to ${{ github.event.client_payload.version }}
# This workflow will automatically update our product formulae on the release of
# new versions
on:
repository_dispatch:
types: [version-updated]
jobs:
update-formula:
name: Update Formula
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with:
# token under hc-github-team-es-release-engineering user
token: ${{ secrets.HOMEBREW_TAP_UPDATER_TOKEN }}
- name: Setup Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v6.0.0
with:
go-version-file: "util/formula_templater/go.mod"
- name: Build formula_templater CLI
run: |
cd util/formula_templater && go build
- name: Generate new formula
if: ${{ github.event.client_payload.cask == 'false' }}
run: |
./util/formula_templater/formula_templater \
${{github.event.client_payload.name}} \
${{github.event.client_payload.version}} \
./util/formula_templater/config.hcl > ./Formula/${{github.event.client_payload.name}}.rb
- name: Generate new cask
if: ${{ github.event.client_payload.cask == 'true' }}
run: |
./util/formula_templater/formula_templater \
-cask \
${{github.event.client_payload.name}} \
${{github.event.client_payload.version}} \
./util/formula_templater/config.hcl > ./Casks/hashicorp-${{github.event.client_payload.name}}.rb
- name: Publish Change
run: |
git config user.name hc-github-team-es-release-engineering
git config user.email [email protected]
git add Formula/*.rb Casks/*.rb
git commit -m "Bump ${{ github.event.client_payload.name }} to ${{ github.event.client_payload.version }}"
# Ensure we have any changes that might have been merged before we push. This narrows the window in which a
# race from multiple changes happening at once can occur. Conflicts/Races could still occur though unlikley.
git pull --rebase
git push