Skip to content

Commit 2696d18

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents e91fee0 + e7d9dee commit 2696d18

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/main.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
release:
12+
types: [published]
13+
schedule:
14+
- cron: '0 0 * * 0'
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
# Runs a set of commands using the runners shell
29+
- name: Install prerequesites
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install jpegoptim -y
33+
sudo -E time bash scripts/install-webp.sh > /dev/null 2>&1
34+
sudo -E time bash scripts/install-optipng.sh > /dev/null 2>&1
35+
sudo wget -qO /usr/local/bin/avif https://github.com/Kagami/go-avif/releases/download/v0.1.0/avif-linux-x64
36+
sudo chmod +x /usr/local/bin/avif
37+
sudo cp optimize.sh /usr/local/bin/img-optimize
38+
sudo chmod 755 /usr/local/bin/img-optimize
39+
40+
- name: Optimize Images
41+
run: |
42+
ls -alh images/
43+
/usr/local/bin/img-optimize --avif
44+
ls -alh images/
45+
/usr/local/bin/img-optimize --webp
46+
ls -alh images/
47+
rm -f images/*.webp images/*.avif
48+
/usr/local/bin/img-optimize --all
49+
ls -alh images/

0 commit comments

Comments
 (0)