Skip to content

Daily Refresh

Daily Refresh #2258

Workflow file for this run

name: Daily Refresh
on:
schedule:
- cron: '15 0,8,16 * * *'
workflow_dispatch:
inputs:
args:
description: "Additional arguments"
required: false
default: ""
jobs:
build:
name: Refresh
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 'stable'
- name: Check out code
uses: actions/checkout@v3
- name: Cache go module
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -o target/gadio-rss
- name: Execute Binray
run: ./target/gadio-rss -T ${{ secrets.BOT_KEY }} ${{ github.event.inputs.args }}
- name: Artifact Database
uses: actions/upload-artifact@v3
with:
path: record.db
retention-days: 1
- name: Self-Push
shell: bash
run: |
if [[ $(git ls-files -m) ]]; then
git config user.name diov-bot
git config user.email [email protected]
git add .
git commit -a -m "Update record (Github Action)"
git push
else
echo "nothing to commit, working tree clean"
fi