Skip to content

Update consul to 1.16.1 #637

Update consul to 1.16.1

Update consul to 1.16.1 #637

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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- name: Setup Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 #v4.0.1
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-espd-packager
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