ci: Use app token for release-please workflow to create PR (#675) #99
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
# Copyright 2021 D2iQ, Inc. All rights reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: release-please-main | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
actions: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Get app token to create PR with | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.GHA_PR_APP_ID }} | |
private-key: ${{ secrets.GHA_PR_APP_PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
- uses: google-github-actions/[email protected] | |
id: release-please | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- if: ${{ steps.release-please.outputs.release_created }} | |
name: Run release workflow | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: release-tag.yaml | |
ref: ${{ steps.release-please.outputs.tag_name }} |