diff --git a/.github/workflows/bump-formula-pr.yml b/.github/workflows/bump-formula-pr.yml index ec37a18e16..a9b93c9bc4 100644 --- a/.github/workflows/bump-formula-pr.yml +++ b/.github/workflows/bump-formula-pr.yml @@ -12,13 +12,18 @@ jobs: name: homebrew-grafana runs-on: ubuntu-latest steps: + - 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" + - 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 + repositories: alloy,homebrew-grafana-test - name: Get latest release uses: rez0n/actions-github-release@main @@ -32,13 +37,18 @@ jobs: uses: Homebrew/actions/setup-homebrew@master - name: Tap Grafana formula repository - run: brew tap grafana/grafana + run: brew tap grafana/grafana-test - name: Update Homebrew formula + # github.event.release.tag_name will have the tag name. # if: 'steps.latest_release.outputs.release_id == github.event.release.id' - uses: Homebrew/actions/bump-packages@master - with: - # Required, custom GitHub access token with the 'public_repo' and 'workflow' scopes - token: ${{ steps.app-token.outputs.token }} - formulae: grafana/grafana/alloy - fork: false + run: | + brew bump-formula-pr \ + --no-browse \ + --no-audit \ + --no-fork \ + --url https://github.com/grafana/alloy/archive/refs/tags/v1.1.1.tar.gz \ + grafana/grafana-test/alloy + env: + HOMEBREW_DEVELOPER: "1" + HOMEBREW_GITHUB_API_TOKEN: ${{ steps.app-token.outputs.token }}