Add route, Update workflow
All checks were successful
CI for GGS-CRON / build-docker (push) Successful in 1m20s
CI for GGS-CRON / build-and-test (push) Successful in 3m14s

This commit is contained in:
Ittipat Lusuk 2025-08-07 14:54:19 +07:00
parent f1b14ac7ea
commit 296c006fd9
4 changed files with 96 additions and 26 deletions

View file

@ -7,31 +7,31 @@ on:
- 'v*'
- 'release-*'
jobs:
# build-and-test:
# runs-on: docker
# container:
# image: node:20-slim
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up timezone
# run: |
# apt-get update && apt-get install -y tzdata
# ln -snf /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
# echo "Asia/Bangkok" > /etc/timezone
# rm -rf /var/lib/apt/lists/*
# - name: Cache npm dependencies
# uses: actions/cache@v3
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Install dependencies
# run: npm install
# - name: Show heartbeat.js version and changelogs
# run: |
# awk '/const heartbeatApiInfo = {/,/};/' plugins/heartbeat.js | sed -n '/version:/,/],/p'
build-and-test:
runs-on: docker
container:
image: node:20-slim
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up timezone
run: |
apt-get update && apt-get install -y tzdata
ln -snf /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
echo "Asia/Bangkok" > /etc/timezone
rm -rf /var/lib/apt/lists/*
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
- name: Show version and changelogs from all plugins
run: |
find plugins -type f -name "*.js" -exec sh -c 'echo "From file: {}"; awk "/version:/{flag=1} flag{print} /]/||/}/{flag=0}" "{}" | sed -n "/version:/,/]/p"' \;
# - name: Run application
# run: npm start
# env: