data/.github/workflows/data-refresh.yml

65 lines
1.8 KiB
YAML
Raw Normal View History

2024-09-12 22:38:32 +02:00
name: W3PN data refresh
# 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:
workflow_run:
2024-09-12 18:08:30 +02:00
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 18:08:30 +02:00
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
2024-09-12 18:08:30 +02:00
- uses: szenius/set-timezone@v2.0
with:
timezoneLinux: "Europe/Prague"
- 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
# cwebp is required by img-opt to manipulate images, script fails without this pre-requisite install
- 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
- uses: EndBug/add-and-commit@v9
2024-09-12 18:08:30 +02:00
with:
default_author: github_actions
message: 'data refresh script has been executed on /data'