Skip to content

docs: add table of contents #3

docs: add table of contents

docs: add table of contents #3

name: Create PR to Main on release
on:
workflow_call:
inputs:
target_branch:
required: true
type: string
description: "Branch to create a pr for"
tag_name:
required: false
type: string
prerelease:
required: false
type: boolean
secrets:
GITHUB_TOKEN:

Check failure on line 17 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-on-release:
if: inputs.target_branch == 'main'
runs-on: ubuntu-latest
steps:
- name: Abort if it's not a pre-release
if: inputs.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 ${{ inputs.tag_name }}" --body "Release ${{ inputs.tag_name }}" --base main --head test --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
create-pr-to-sync-with-main:
if: inputs.target_branch != 'main'
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: 'main'
- name: Create Pull Request from main to test
run: |
gh pr create --title "Sync ${{ inputs.target_branch }} with main" --base ${{ inputs.target_branch }} --head main --repo ${{ github.repository }} --label "sync"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}