40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
# 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
|