From 51386bef25bcd178ec7329e9c11c3cc159faa2a8 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Tue, 11 Jun 2024 13:45:57 -0400 Subject: [PATCH] use test repository --- .github/workflows/bump-formula-pr.yml | 35 +++++++++++++++++++++------ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/bump-formula-pr.yml b/.github/workflows/bump-formula-pr.yml index ec37a18e16..056ad56cf4 100644 --- a/.github/workflows/bump-formula-pr.yml +++ b/.github/workflows/bump-formula-pr.yml @@ -18,7 +18,15 @@ jobs: app-id: ${{ secrets.ALLOYBOT_APP_ID }} private-key: ${{ secrets.ALLOYBOT_PRIVATE_KEY }} owner: grafana - repositories: alloy,homebrew-grafana + repositories: alloy,homebrew-grafana-test + + - 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" + gh auth setup-git + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - name: Get latest release uses: rez0n/actions-github-release@main @@ -32,13 +40,24 @@ jobs: uses: Homebrew/actions/setup-homebrew@master - name: Tap Grafana formula repository - run: brew tap grafana/grafana + run: brew tap grafana/grafana-test + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - name: Update Homebrew formula # 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: | + gh auth status + git config --list + + echo "protocol=https\nhost=github.com" | git credential fill + + 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" + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}