Skip to content

Commit

Permalink
Merge pull request #180 from fingerprintjs/feat/create-pr-workflow
Browse files Browse the repository at this point in the history
ci: create PR on pre-release
  • Loading branch information
ilfa authored Nov 24, 2023
2 parents 7b84f5e + 6140cb4 commit 1940c90
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 test --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1940c90

Please sign in to comment.