-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.53 KB
/
auto-pr.yaml
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
42
43
44
---
name: Upstream to PR
on:
workflow_call:
inputs: {upstream_repository: {required: true, type: string}, upstream_tag_regex: {required: false, type: string}, upstream_branch: {required: false,
type: string, default: main}, reviewers: {required: false, type: string}, team_reviewers: {required: false, type: string}}
secrets:
personal_access_token:
required: true
jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.personal_access_token }}
- uses: fopina/[email protected]
id: autopr-tag
if: inputs.upstream_tag_regex != null
with:
token: ${{ secrets.personal_access_token }}
upstream-repository: ${{ inputs.upstream_repository }}
upstream-tag: ${{ inputs.upstream_tag_regex }}
reviewers: ${{ inputs.reviewers }}
team_reviewers: ${{ inputs.team_reviewers }}
- uses: fopina/[email protected]
id: autopr-branch
if: inputs.upstream_tag_regex == null && inputs.upstream_branch != null
with:
token: ${{ secrets.personal_access_token }}
upstream-repository: ${{ inputs.upstream_repository }}
upstream-branch: ${{ inputs.upstream_branch }}
reviewers: ${{ inputs.reviewers }}
team_reviewers: ${{ inputs.team_reviewers }}
- name: Display output
run: |
echo "Tag: ${{ steps.autopr-tag.outputs.pull-request-url }}"
echo "Branch: ${{ steps.autopr-branch.outputs.pull-request-url }}"