-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (96 loc) · 3.35 KB
/
cron.action.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Update Dependencies
permissions:
pull-requests: write
repository-projects: write
contents: write
on:
schedule:
- cron: '0 3 * * 2'
workflow_dispatch:
jobs:
linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
node-version: 14
- run: chmod +x "${GITHUB_WORKSPACE}/.github/scripts/build-file-linter.sh"
- run: '${GITHUB_WORKSPACE}/.github/scripts/build-file-linter.sh'
dot_only_linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
node-version: 14
- run: chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dot-only-test-linter.sh"
- run: '${GITHUB_WORKSPACE}/.github/scripts/dot-only-test-linter.sh'
eslint_linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node common/scripts/install-run-rush.js update
- run: node common/scripts/install-run-rush.js lint
prettier_linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node common/scripts/install-run-rush.js update
- run: node common/scripts/install-run-rush.js prettier
pr_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node common/scripts/install-run-rush.js update
- run: node common/scripts/install-run-rush.js test
dependabot-update:
runs-on: ubuntu-latest
needs: [linter_job, dot_only_linter_job, eslint_linter_job, prettier_linter_job, pr_job]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
node-version: 14
- name: Update Lock File
run: node common/scripts/install-run-rush.js update
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
commit-message: Updated project dependencies
title: Update lock-file after Dependabot updates
body: Update lock-file after Dependabot updates
base: master
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
labels: automated-pr, dependabot-cleanup
branch: rush-lockfile-updates
delete-branch: true
- name: Check Outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: Merge PR
if: ${{ steps.cpr.outputs.pull-request-number }}
uses: 'pascalgn/automerge-action@v0.15.5'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_METHOD: 'squash'
MERGE_RETRIES: '2'
MERGE_RETRY_SLEEP: '10000'
MERGE_REQUIRED_APPROVALS: '0'
UPDATE_METHOD: 'rebase'
PULL_REQUEST: '${{ steps.cpr.outputs.pull-request-number }}'