-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.34 KB
/
release-trigger.yml
File metadata and controls
44 lines (42 loc) · 1.34 KB
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
40
41
42
43
44
name: ReleaseTrigger
on:
workflow_dispatch:
schedule:
# * is a special character in YAML, so we have to quote this string
- cron: "0 4 5 * *"
permissions:
contents: read
jobs:
build:
name: Trigger release
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Update trigger
run: |
date +%s > .release-trigger
- name: Create git branch
run: |
git config --global user.name 'Esta Nagy'
git config --global user.email 'nagyesta@gmail.com'
git checkout -b release/run-${{ github.run_number }}
git add .release-trigger
git commit -asm "Triggering a release {patch}"
git push -f --set-upstream origin release/run-${{ github.run_number }}
- name: Create PR
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: "release/run-${{ github.run_number }}",
base: "main",
title: "Triggering a release {patch}"
});