Skip to content

Runner #54

Runner #54 #54

Workflow file for this run

name: RSS Runner
run-name: 'Runner #${{ github.run_number }} ${{ inputs.suffix }}'
on:
workflow_dispatch:
inputs:
suffix:
description: 'Input suffix'
required: false
type: string
schedule:
- cron: '0 */2 * * *'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
cache-dependency-path: server/pnpm-lock.yaml
- name: Get pnpm cache directory
id: pnpm-store-path
shell: bash
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}
- name: Cache modules
id: pnpm-cache
uses: actions/cache@v3
with:
path: |
${{ steps.pnpm-store-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install npm dependencies
working-directory: ./server
run: pnpm install
- name: Run npm scripts
working-directory: ./server
env:
WORKFLOW: true
RSS_CONFIG: ${{ secrets.RSS_CONFIG }}
run: pnpm run once
- name: Commit all changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: update by action runner https://github.com/ChanceYu/front-end-rss/actions/runs/${{ github.run_id }}