Skip to content

ci: Create workflow update-homebrew-formula.yml #37

ci: Create workflow update-homebrew-formula.yml

ci: Create workflow update-homebrew-formula.yml #37

name: Update Homebrew Formula
on:
workflow_dispatch:
pull_request:
jobs:
update-homefrew-formula:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: lacework/homebrew-tap
path: homebrew-tap
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Update CLI Version
working-directory: homebrew-tap
env:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
run: |
sudo apt-get update -y
sudo apt-get install gpg-agent -y
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
make update-cli-version
- name: Notify Slack on Failure
if: failure()
uses: slackapi/slack-github-action@v1.25.0
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*GitHub Workflow Failure*\ngo-sdk/update-homebrew-formula\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}\n@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK