v1.5.0 #59
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: bump-formula-pr | |
on: | |
release: | |
types: [released] | |
jobs: | |
homebrew-grafana: | |
name: homebrew-grafana | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.ALLOYBOT_APP_ID }} | |
private-key: ${{ secrets.ALLOYBOT_PRIVATE_KEY }} | |
owner: grafana | |
repositories: alloy,homebrew-grafana | |
# These need to be hard-coded to the bot being used; ideally in the future | |
# we can find a way to automatically determine this based on the token. | |
- name: Setup Git | |
run: | | |
git config --global user.name "grafana-alloybot[bot]" | |
git config --global user.email "879451+grafana-alloybot[bot]@users.noreply.github.com" | |
- name: Get latest release | |
uses: rez0n/actions-github-release@main | |
id: latest_release | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
repository: "${{ github.repository }}" | |
type: "stable" | |
- name: Setup Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- name: Tap Grafana formula repository | |
run: brew tap grafana/grafana | |
- name: Update Homebrew formula | |
if: 'steps.latest_release.outputs.release_id == github.event.release.id' | |
run: | | |
brew bump-formula-pr \ | |
--no-browse \ | |
--no-audit \ | |
--no-fork \ | |
--url https://github.com/grafana/alloy/archive/refs/tags/${{ github.ref_name }}.tar.gz \ | |
grafana/grafana/alloy | |
env: | |
HOMEBREW_DEVELOPER: "1" | |
HOMEBREW_GITHUB_API_TOKEN: ${{ steps.app-token.outputs.token }} |