-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.04 KB
/
tagpr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: tagpr
on:
push:
branches:
- main
jobs:
tagpr:
runs-on: ubuntu-latest
outputs:
tagpr-tag: ${{ steps.tagpr.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v4
- id: tagpr
name: Run tagpr
uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger release Workflow
uses: actions/github-script@v7
continue-on-error: true
if: steps.tagpr.outputs.tag != ''
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let refs = '${{ fromJson(steps.tagpr.outputs.pull_request).head.ref }}'
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'release.yml',
ref: refs,
inputs: {
tag: '${{ steps.tagpr.outputs.tag }}'
},
})