From d1120ad56ee325e4de2d8c3ae29fb10d6378b238 Mon Sep 17 00:00:00 2001 From: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:52:22 -0400 Subject: [PATCH] chore: add automated homebrew action (#2164) * chore: add automated homebrew action Signed-off-by: Christopher Phillips * migrate homebrew publish step to separate post-release workflow Signed-off-by: Alex Goodman --------- Signed-off-by: Christopher Phillips Signed-off-by: Alex Goodman Co-authored-by: Alex Goodman --- .github/workflows/release-homebrew.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release-homebrew.yaml diff --git a/.github/workflows/release-homebrew.yaml b/.github/workflows/release-homebrew.yaml new file mode 100644 index 000000000..0ccacd17b --- /dev/null +++ b/.github/workflows/release-homebrew.yaml @@ -0,0 +1,25 @@ +name: "Release Homebrew" + +on: + release: + types: [published] + +jobs: + homebrew: + runs-on: ubuntu-20.04 + steps: + - name: Update Homebrew formula + uses: dawidd6/action-homebrew-bump-formula@d3667e5ae14df19579e4414897498e3e88f2f458 # v3.10.0 + with: + token: ${{ secrets.HOMEBREW_TOKEN }} + org: anchore + formula: syft + + - uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #v3.15.1 + if: ${{ failure() }} + with: + status: ${{ job.status }} + fields: repo,workflow,action,eventName + text: "Post-release homebrew publish workflow has failed: https://github.com/anchore/syft/actions/workflows/release-homebrew.yaml" + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}