-
Notifications
You must be signed in to change notification settings - Fork 14
70 lines (62 loc) · 2.13 KB
/
generate_upgrades.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Generate upgrade commit from *_full branch
on:
# Triggers the workflow on push to *_full branches
push:
branches: [ main_full, development_full ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
GITHUB_REF_NAME:
description: 'Target'
required: true
default: 'main_full'
type: choice
options:
- main_full
jobs:
generate_upgrade:
runs-on: ubuntu-latest
steps:
- name: Determine target _upgrade branch
id: target_branch
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
INTERSECT_TARGET_BRANCH=${GITHUB_REF_NAME/_full/_upgrade}
echo "name=$INTERSECT_TARGET_BRANCH" >> $GITHUB_OUTPUT
- name: Checkout target _upgrade branch
uses: actions/checkout@v3
with:
fetch-depth: 0
path: target
ref: ${{ steps.target_branch.outputs.name }}
token: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }}
- name: Checkout branch of the custom action
uses: actions/checkout@v3
with:
path: actions
ref: actions
token: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }}
- name: Checkout modified files from _full branch
uses: ./actions/generate-upgrade-commit
with:
base-revision: a14d915251570c4bdc2e2b0562130621781becd2
repo-root: target
target-revision: ${{ github.sha }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
git_commit_gpgsign: true
git_config_global: true
git_user_signingkey: true
gpg_private_key: ${{ secrets.INTERSECTBOT_GPG_PRIVATE_KEY }}
- name: Generate commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
add_options: '-A'
commit_message: "bot: automatically generating upgrade commit for ${{ github.sha }}"
commit_options: '--no-verify --signoff'
commit_user_name: Intersect Bot
commit_user_email: [email protected]
repository: target
skip_fetch: true