mirror of
https://github.com/web3privacy/data
synced 2024-10-15 18:16:28 +02:00
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
name: W3PN data refresh
|
|
# This file manages the workflow for update scripts wthin the MAKEFILE, run to refresh the codebase.
|
|
|
|
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
|
|
|
|
- uses: denoland/setup-deno@v1
|
|
with:
|
|
deno-version: v1.x
|
|
|
|
- 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 refresh script
|
|
run: make refresh
|
|
# executes 'deno run' on utils/engine.js /images.js /img-opt.js and /test.js
|
|
|
|
- uses: EndBug/add-and-commit@v9
|
|
with:
|
|
default_author: github_actions
|
|
message: 'data refresh script has been executed on /data'
|