From 5c226869a1c5d12807b316af585806e7f710c016 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Tue, 17 May 2022 11:51:46 -0700 Subject: [PATCH] fix release token and set committer on bcr workflow (#111) * ci: use github bot token for release * ci: set committers and pr assignees in bcr workflow --- .github/workflows/bcr.yml | 8 ++------ .github/workflows/release.yml | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bcr.yml b/.github/workflows/bcr.yml index 5590d50..923f158 100644 --- a/.github/workflows/bcr.yml +++ b/.github/workflows/bcr.yml @@ -27,9 +27,6 @@ env: # Fork of the bazel central registery to push the pull request branch to BCR_FORK: aspect-build/bazel-central-registry - # String containing submitters to tag - SUBMITTERS: "@alexeagle, @kormide" - jobs: bcr-pull-request: runs-on: ubuntu-latest @@ -66,13 +63,12 @@ jobs: token: ${{ steps.generate-token.outputs.token }} path: bcr push-to-fork: ${{ env.BCR_FORK }} + committer: ${{ github.actor }} commit-message: ${{ github.repository }}@${{ steps.get_tag.outputs.TAG }} branch: ${{ github.repository }}@${{ steps.get_tag.outputs.TAG }} title: ${{ github.repository }}@${{ steps.get_tag.outputs.TAG }} + assignees: ${{ github.actor }} body: | [Automated] Publish ${{ github.repository }}@${{ steps.get_tag.outputs.TAG }}. - - Submitters: - ${{ env.SUBMITTERS }} - name: Echo PR url run: echo ${{ steps.post_pr.outputs.pull-request-url }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94a42cf..ade2715 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,11 @@ jobs: run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //... - name: Prepare workspace snippet run: .github/workflows/workspace_snippet.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt + - uses: tibdex/github-app-token@v1 + id: generate-token + with: + app_id: ${{ secrets.BCR_APP_ID }} + private_key: ${{ secrets.BCR_APP_PRIVATE_KEY }} - name: Release uses: softprops/action-gh-release@v1 with: @@ -36,3 +41,4 @@ jobs: # Use GH feature to populate the changelog automatically generate_release_notes: true body_path: release_notes.txt + token: ${{ steps.generate-token.outputs.token }}