chore: add snapshot release pipelines #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Experimental PR Creation | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
create-experimental-pr: | |
if: github.event.label.name == 'experimental' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout the PR branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
- name: Create/Update the experimental branch from main | |
run: git push -f origin main:refs/heads/experimental | |
- name: Create PR to experimental | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
SOURCE_BRANCH: ${{ github.event.pull_request.head.ref }} | |
run: | | |
gh pr create \ | |
--base experimental \ | |
--head "$SOURCE_BRANCH" \ | |
--title "🧪 $PR_TITLE" \ | |
--body "This PR was automatically created from #$PR_NUMBER when the 'experimental' label was added. | |
Original PR: #$PR_NUMBER" \ | |
--label experimental |