From d6d8b9b091707cd4743e1f558b9cfd6763205948 Mon Sep 17 00:00:00 2001 From: eric5949 Date: Thu, 23 Apr 2026 20:13:46 -0400 Subject: [PATCH] make action to update songs weekly also added autoupdate option to config for { spoilers } --- .github/workflows/songupdate.yml | 39 ++++++++++++++++++++++++++++++++ tetosong.config | 1 + 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/songupdate.yml diff --git a/.github/workflows/songupdate.yml b/.github/workflows/songupdate.yml new file mode 100644 index 0000000..7b1ca4d --- /dev/null +++ b/.github/workflows/songupdate.yml @@ -0,0 +1,39 @@ +# This is a basic workflow to help you get started with Actions + +name: Update tetofortunes files + +# Controls when the workflow will run +on: + schedule: + - cron: "0 3 * * Sun" # run every sunday at 3am + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + upload: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + # Runs a set of commands using the runners shell + - name: Run makefortune.sh + run: | + echo Installing dependencies... + sudo apt-get update + sudo apt-get install -y fortune-mod jq + echo Dependencies installed. Running makefortune.sh... + sh makefortune.sh + - name: Upload artifact + uses: actions/upload-artifact@v7 + with: + name: updated_songs + path: | + tetofortunes + tetofortunes.dat + var.json diff --git a/tetosong.config b/tetosong.config index 460a79a..c8e851a 100644 --- a/tetosong.config +++ b/tetosong.config @@ -1 +1,2 @@ AUDIO="YES" +AUTOUPDATE="NO"