Skip to content

Daily Refresh

Daily Refresh #3554

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@v5
with:
go-version: 'stable'
- name: Check out code
uses: actions/checkout@v4
- name: Cache go module
uses: actions/cache@v4
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 }} -A ${{ secrets.S3_ACCOUNT }} \
-K ${{ secrets.S3_KEY_ID }} -S ${{ secrets.S3_KEY_SECRET }} ${{ github.event.inputs.args }}
- name: Artifact Database
uses: actions/upload-artifact@v4
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