Merge pull request #241 from tier4/sync-awf-upstream #111
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
name: dispatch-release-note | |
on: | |
push: | |
branches: | |
- beta/v* | |
- tier4/main | |
tags: | |
- v* | |
workflow_dispatch: | |
inputs: | |
beta-branch-or-tag-name: | |
description: The name of the beta branch or tag to write release note | |
type: string | |
required: true | |
jobs: | |
dispatch-release-note: | |
runs-on: ubuntu-latest | |
name: release-repository-dispatch | |
steps: | |
- name: Set ref name | |
id: set-ref-name | |
run: | | |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}" | |
else | |
REF_NAME="${{ github.ref_name }}" | |
fi | |
echo ::set-output name=ref-name::"${{ github.repository }}/'$REF_NAME'" | |
- name: Generate token | |
id: generate-token | |
uses: tibdex/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.PRIVATE_KEY }} | |
- name: Repository dispatch for release note | |
run: | | |
curl \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
"https://api.github.com/repos/tier4/update-release-notes/dispatches" \ | |
-d '{"event_type":"${{ steps.set-ref-name.outputs.ref-name }}"}' |