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
This commit is contained in:
Derek Cormier 2022-05-17 11:51:46 -07:00 committed by GitHub
parent ba519a9e1f
commit 5c226869a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -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 }}

View File

@ -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 }}