Skip to content

feat: add shared PR actions #1

feat: add shared PR actions

feat: add shared PR actions #1

name: Create PR to Main
on:
workflow_call:
secrets:
GITHUB_TOKEN:

Check failure on line 6 in .github/workflows/create-pr-to-main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/create-pr-to-main.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
jobs:
create-pr-to-main:
runs-on: ubuntu-latest
steps:
- name: Abort if it's not a pre-release
if: github.event.release.prerelease == false
run: exit 1
- name: Checkout test branch
uses: actions/checkout@v3
with:
ref: 'test'
- name: Create Pull Request from tag branch to main
run: |
gh pr create --title "Release ${{ github.event.release.tag_name }}" --body "Release ${{ github.event.release.tag_name }}" --base main --head test --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}