From d9392962fea7a0f725428ef4858c6e0ae9894882 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Mon, 9 Dec 2024 13:50:12 +0100 Subject: [PATCH] adds action to convert images in PRs --- .github/workflows/convertimages.yml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/convertimages.yml diff --git a/.github/workflows/convertimages.yml b/.github/workflows/convertimages.yml new file mode 100644 index 00000000..0d3cebb5 --- /dev/null +++ b/.github/workflows/convertimages.yml @@ -0,0 +1,44 @@ +name: Convert Images + +on: + pull_request: + types: [opened, synchronize] + push: + branches: + - '*' + +permissions: + actions: read + checks: read + contents: read + deployments: none + issues: read + packages: none + pull-requests: read + repository-projects: none + security-events: none + statuses: none + +jobs: + build: + runs-on: 'ubuntu-latest' + name: Convert Images + steps: + - uses: actions/checkout@v4 + - name: Install Dependencies + run: | + git clone --recursive https://github.com/kornelski/pngquant.git + cd pngquant + cargo build --release + cd .. + + sudo add-apt-repository universe + sudo add-apt-repository ppa:inkscape.dev/stable + sudo apt-get update + sudo apt install inkscape + + sudo apt install imagemagick + shell: bash + - name: Run convert images + run: ./convert.sh + shell: bash \ No newline at end of file