-
Notifications
You must be signed in to change notification settings - Fork 331
36 lines (32 loc) · 1.05 KB
/
schedule-rc.yml
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
name: Schedule RC
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
cut-release-candidate:
name: Cut RC
runs-on: ubuntu-latest
timeout-minutes: 30
environment: PUSH_TO_RC_BRANCH
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PUSH_TO_RC_BRANCH_APP_ID }}
private-key: ${{ secrets.PUSH_TO_RC_BRANCH_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Cut Release Candidate
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "IDX GitHub Automation"
RC_BRANCH_NAME="rc--$(date '+%Y-%m-%d_%H-%M')"
git switch --force-create "$RC_BRANCH_NAME" HEAD
git push --force --set-upstream origin "$RC_BRANCH_NAME"