forked from rancher-sandbox/rancher-desktop
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (34 loc) · 996 Bytes
/
release-merge-to-main.yaml
File metadata and controls
39 lines (34 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "Release: Merge to main"
on:
release:
types:
- created
- published
- released
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
check-for-token:
outputs:
has-token: ${{ steps.calc.outputs.HAS_SECRET }}
runs-on: ubuntu-latest
steps:
- id: calc
run: echo "HAS_SECRET=${HAS_SECRET}" >> "${GITHUB_OUTPUT}"
env:
HAS_SECRET: ${{ secrets.RUN_WORKFLOW_FROM_WORKFLOW != '' }}
create-pr:
needs: check-for-token
if: needs.check-for-token.outputs.has-token == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/yarn-install
- run: node scripts/ts-wrapper.js scripts/release-merge-to-main.ts
env:
GITHUB_WRITE_TOKEN: ${{ github.token }}
GITHUB_PR_TOKEN: ${{ secrets.RUN_WORKFLOW_FROM_WORKFLOW }}