-
-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (76 loc) · 2.8 KB
/
cron.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
71
72
73
74
75
76
77
78
79
80
name: Run sudo-bot to update files
permissions:
contents: read
env:
VERSION: 1.3.1-rc1
on:
repository_dispatch:
types: run-cron
workflow_dispatch:
schedule:
- cron: "30 13 * * 6"
jobs:
run-sudo-bot-cron:
environment:
name: sudo-bot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: yarn cache
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: composer cache module
uses: actions/cache@v4
with:
path: ~/.composer/cache/
key: composer-cache
- name: Cache cargo binaries
uses: actions/cache@v4
id: cache-mariadb-mysql-kbs
with:
path: ~/.cargo/bin/mariadb-mysql-kbs
key: ${{ runner.os }}-cargo-bin-mariadb-mysql-kbs-${{ env.VERSION }}
- name: Set up toolchain
if: steps.cache-mariadb-mysql-kbs.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.74
override: true
- name: Install mariadb-mysql-kbs (${{ env.VERSION }})
if: steps.cache-mariadb-mysql-kbs.outputs.cache-hit != 'true'
run: cargo install mariadb-mysql-kbs@${{ env.VERSION }}
- name: Install
run: |
yarn install
composer install --no-interaction
- name: Build
run: |
mariadb-mysql-kbs extract
composer run build
- name: Install sudo-bot
run: yarn global add sudo-bot
- name: Run sudo-bot
env:
INSTALLATION_ID: ${{ secrets.INSTALLATION_ID }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GH_APP_JWT_PRIV_PEM_CONTENTS: ${{ secrets.GH_APP_JWT_PRIV_PEM_CONTENTS }}
TARGET_BRANCH: "main"
SKIP_DOCS_STEPS: "yes"
TEMPLATE_FILE: "template.js"
run: ./scripts/sudo-bot/create-pr.sh
- name: Run test
run: |
yarn run test
composer run test