microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/fix-8243

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/merge-release-in-main.yml

44lines · modecode

1name: Merge release branch back into main
2
3on:
4 # Allows you to run this workflow manually from the Actions tab
5 workflow_dispatch:
6 push:
7 branches:
8 - "release/*"
9
10concurrency: ${{ github.workflow }}-${{ github.ref }}
11
12# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13permissions:
14 id-token: write
15 contents: write
16 pull-requests: write
17
18jobs:
19 # Create PR
20 create:
21 runs-on: ubuntu-latest
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v3
25
26 - name: Generate branch name
27 id: branchname
28 run: |
29 echo "branchname=backmerge/${{ github.ref_name }}-$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
30 - name: Create branch
31 run: |
32 branch="${{ steps.branchname.outputs.branchname }}"
33 git checkout -b $branch
34 git push --set-upstream origin $branch
35
36 - name: create pull request
37 id: open-pr
38 uses: repo-sync/pull-request@v2
39 with:
40 github_token: ${{ secrets.GITHUB_TOKEN }}
41 source_branch: ${{ steps.branchname.outputs.branchname }}
42 destination_branch: ${{ github.event.repository.default_branch }}
43 pr_title: "[Automated] Merge ${{ github.ref_name }} into ${{ github.event.repository.default_branch }}"
44 pr_body: "Merge ${{github.ref}} back into ${{ github.event.repository.default_branch }}"
45