-
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (71 loc) · 2.62 KB
/
debug-timezone.yaml
File metadata and controls
78 lines (71 loc) · 2.62 KB
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
name: debug time zone
on:
push:
branches: [debug-timezone]
# schedule:
# # m h d M w y
# - cron: 15 * * * * # run per 30 min
workflow_dispatch:
jobs:
# build job
build:
runs-on: ${{ matrix.os }} # run on spec os
timeout-minutes: 10
strategy:
matrix:
# set nodejs matrix
node_version: [12.x]
# set os matrix
os: [ubuntu-latest]
# architecture: [x86, x64]
architecture:
- x64
fail-fast: false
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
steps:
- name: sync git repo
uses: actions/checkout@v3
- name: install pnpm
uses: pnpm/action-setup@v2 #https://github.com/pnpm/action-setup
with:
version: 6.34.0
- name: set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
cache: pnpm
- name: set pnpm store directory
# run: pnpm config set store-dir ~/.pnpm-store
run: pnpm config set store-dir .pnpm-store
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
# - name: get pnpm store directory
# id: pnpm-cache
# run: |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# name: set pnpm cache directory
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# - uses: szenius/set-timezone@v1.0
# name: set timezone
# with:
# timezoneLinux: "Asia/Shanghai"
# timezoneMacos: "Asia/Shanghai"
# timezoneWindows: "Shanghai Standard Time"
# https://github.com/marketplace/actions/set-timezone
- name: install dependencies
run: pnpm i
- name: gen readme with repo bins
run: ./bin/render-readme.js
- name: commit files
# git commit -m "chore(core): update readme in github action" --date "$(date "+%Y-%m-%d %H:%M:%S" -d "+8 hour") +0800"
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add README.md updated-time.md
git commit -m "chore(core): update readme in github action" --date "$(date "+%Y-%m-%d %H:%M:%S" -d "+8 hour") +0800"
git log --pretty=format:"%ai" -n 3