Skip to content

Commit

Permalink
ci: add PR action
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Nov 24, 2023
1 parent 7b84f5e commit 78474b8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/create-pr-to-main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Create PR to Main

on:
workflow_run:
workflows: ["Pre-release E2E tests"]
# branches: ["test"]
release:
types:
- completed
- published
- prereleased

permissions:
pull-requests: write
Expand All @@ -15,13 +14,16 @@ 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
- name: Create Pull Request from tag branch to main
run: |
gh pr create --base production --head main --title "Merge test into main" --body "Automated PR to merge test branch into main"
gh pr create --title "Release ${{ github.event.release.tag_name }}" --body "Release ${{ github.event.release.tag_name }}" --base main --head ${{ github.event.release.tag_name }} --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 78474b8

Please sign in to comment.