units: aberrants +20% arcane RES #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: optimize | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
env: | |
WESNOTH_VERSION: 1.17.24 | |
jobs: | |
optimize: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Optimize images | |
uses: czyzby/wesnoth-png-optimizer@v1 | |
continue-on-error: true | |
with: | |
wesnoth-version: ${{ env.WESNOTH_VERSION }} | |
threshold: 0 | |
- name: Commit changes | |
continue-on-error: true | |
run: | | |
git config user.name "GitHub Action" | |
git config user.email "actions@users.noreply.github.com" | |
git config --add --bool push.autoSetupRemote true | |
git checkout -b "optimize/$GITHUB_SHA" | |
git commit -am "🤖 Optimize $GITHUB_REPOSITORY@$GITHUB_SHA" && git push | |
- name: Create pull request | |
run: gh pr create -B master -H "optimize/$GITHUB_SHA" --title "Optimize images from @${GITHUB_SHA::7}" --body "Images from $GITHUB_REPOSITORY@$GITHUB_SHA optimized with `woptipng`." | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} |