2023-02-21 05:01:17 +08:00
|
|
|
# creates a PR from release branch to master
|
2023-02-24 05:11:57 +08:00
|
|
|
name: Create Release PR to master
|
2023-02-21 05:01:17 +08:00
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
2023-02-23 09:17:34 +08:00
|
|
|
description: "netmaker version"
|
2023-02-21 05:01:17 +08:00
|
|
|
required: true
|
2023-02-24 05:11:57 +08:00
|
|
|
release:
|
|
|
|
types: [released]
|
|
|
|
|
2023-02-21 05:01:17 +08:00
|
|
|
jobs:
|
|
|
|
pr-to-main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: create pr
|
2023-02-24 05:11:57 +08:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-02-21 05:01:17 +08:00
|
|
|
run: |
|
2023-02-24 05:11:57 +08:00
|
|
|
gh api --method POST \
|
|
|
|
-H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' \
|
|
|
|
/repos/${{ github.repository }}/pulls \
|
|
|
|
-f title='${{ github.event.inputs.version }}' \
|
|
|
|
-f head='release_${{ github.event.inputs.version }}' \
|
|
|
|
-f base="master"
|
2023-02-21 05:01:17 +08:00
|
|
|
|
|
|
|
|