ci: Create workflow update-homebrew-formula.yml #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Homebrew Formula | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
update-homefrew-formula: | |
runs-on: arc-runner-lacework-generic-medium | |
permissions: | |
id-token: write | |
# container: | |
# image: homebrew/brew:latest | |
# options: --user root | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: lacework/homebrew-tap | |
path: homebrew-tap | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: lacework-dev/actions | |
path: github-actions | |
- 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: Send Results To Slack | |
if: failure() | |
uses: ./github-actions/report-to-slack-v1 | |
with: | |
channel-id: "pengyuan-test" | |
env: | |
SLACK_GITHUB_WORKFLOW_URL: "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click Here To View Complete Run>" | |
SLACK_WORKFLOW_NAME: "update-homebrew-formula" | |
SLACK_GITHUB_AUTHOR: ${{ github.actor }} | |
SLACK_GITHUB_BRANCH: ${{ github.ref_name }} | |
TITLE_TEXT: "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:" | |
HEADER_TEXT: "GitHub Workflow Failure" | |
ATTACHMENT_COLOR: "#E92020" | |
# - name: Failure Notification | |
# if: failure() | |
# uses: slackapi/slack-github-action@v1.25.0 | |
# with: | |
# payload: | | |
# { | |
# "attachments": [ | |
# { | |
# "color": "#A30200", | |
# "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.GROWTH_SLACK_WEBHOOK }} |