2024-09-12 22:38:32 +02:00
|
|
|
name: W3PN data refresh
|
2024-10-11 13:28:17 +02:00
|
|
|
# This file manages the workflow for update scripts wthin the MAKEFILE
|
|
|
|
# Run to refresh the event images, speaker images, and generating the thumbs for them
|
2024-09-12 18:08:30 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 1 * *'
|
|
|
|
workflow_run:
|
|
|
|
workflows: ["Synchronize data"]
|
|
|
|
types:
|
|
|
|
- completed
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
id-token: write
|
|
|
|
pages: write
|
|
|
|
actions: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
refresh-data:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout your repository using git
|
|
|
|
uses: actions/checkout@v4
|
2024-09-12 21:47:31 +02:00
|
|
|
|
2024-09-12 18:08:30 +02:00
|
|
|
- uses: denoland/setup-deno@v1
|
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
2024-09-12 21:47:31 +02:00
|
|
|
|
2024-09-12 18:08:30 +02:00
|
|
|
- uses: szenius/set-timezone@v2.0
|
|
|
|
with:
|
|
|
|
timezoneLinux: "Europe/Prague"
|
2024-09-12 21:47:31 +02:00
|
|
|
|
|
|
|
- name: Install cwebp
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pwd
|
|
|
|
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev
|
|
|
|
wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.4-linux-x86-64.tar.gz
|
|
|
|
tar xzvf libwebp-1.2.4-linux-x86-64.tar.gz
|
|
|
|
cd libwebp-1.2.4-linux-x86-64/bin
|
|
|
|
mv cwebp ${{ github.workspace }}
|
|
|
|
cd ../..
|
|
|
|
rm -rf libwebp-1.2.4-linux-x86-64
|
|
|
|
rm -rf libwebp-1.2.4-linux-x86-64.tar.gz
|
|
|
|
sudo mv cwebp /bin
|
|
|
|
ls
|
2024-09-12 22:33:51 +02:00
|
|
|
# cwebp is required by img-opt to manipulate images, script fails without this pre-requisite install
|
2024-09-12 21:47:31 +02:00
|
|
|
|
2024-10-11 13:28:17 +02:00
|
|
|
- name: run MAKEFILE environment
|
|
|
|
run: make build
|
|
|
|
# executes deno run --allow-all utils/build.js
|
|
|
|
- name: run images.js
|
|
|
|
run: make images
|
|
|
|
|
|
|
|
- name: run img-opt.js
|
|
|
|
run: make img-opt
|
|
|
|
|
|
|
|
- name: run test.js
|
|
|
|
run: make test
|
2024-09-12 22:33:51 +02:00
|
|
|
|
|
|
|
- uses: EndBug/add-and-commit@v9
|
2024-09-12 18:08:30 +02:00
|
|
|
with:
|
2024-09-12 22:33:51 +02:00
|
|
|
default_author: github_actions
|
|
|
|
message: 'data refresh script has been executed on /data'
|