-
-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (56 loc) · 1.97 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
name: Run sudo-bot to update files
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@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: yarn cache
uses: actions/cache@v2
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@v2
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install
run: |
yarn install
composer install --no-interaction
- name: Build
run: |
yarn run build
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