generated from johngeorgewright/ts-module
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.43 KB
/
build-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
name: Build Cron
on:
schedule:
- cron: '* * 1 * *'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
token: ${{ secrets.MOL_TOKEN }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Setup
run: yarn --immutable
- name: Build
run: yarn build
- name: Test
run: yarn test
env:
JWT_EMAIL: ${{ secrets.JWT_EMAIL }}
JWT_KEY: ${{ secrets.JWT_KEY }}
NETWORK_CODE: ${{ secrets.NETWORK_CODE }}
- name: Update state
id: state
run: | # shell
COMMIT="$(yarn commit:state)"
COMMIT="${COMMIT//'%'/'%25'}"
COMMIT="${COMMIT//$'\n'/'%0A'}"
COMMIT="${COMMIT//$'\r'/'%0D'}"
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.state.outputs.commit != ''
uses: peter-evans/create-pull-request@v7
with:
body: ${{ fromJson(steps.state.outputs.commit).prBody }}
branch: ${{ fromJson(steps.state.outputs.commit).branch }}
commit-message: ${{ fromJson(steps.state.outputs.commit).commitMessage }}
labels: ${{ fromJson(steps.state.outputs.commit).labels }}
title: ${{ fromJson(steps.state.outputs.commit).prTitle }}