Skip to content

Commit

Permalink
Workflow dispatch to oxipng
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Nov 6, 2024
1 parent a7860d1 commit 90ae6e8
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,29 +104,22 @@ jobs:

oxipng:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
checks: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
#token: ${{ secrets.PR_PUSH_TOKEN }}

- name: "Run oxipng to reduce PNG sizes"
run: |
wget https://github.com/shssoichiro/oxipng/releases/download/v${OXIPNG_VERSION}/oxipng-${OXIPNG_VERSION}-x86_64-unknown-linux-musl.tar.gz \
-O /tmp/oxipng.tar.gz
tar -xvzf /tmp/oxipng.tar.gz -C /tmp
mv /tmp/oxipng-${OXIPNG_VERSION}-x86_64-unknown-linux-musl/oxipng ./oxipng
chmod +x ./oxipng
./oxipng --version
./oxipng --strip safe --alpha -r src
# See https://github.com/EndBug/add-and-commit#add--commit.
- name: "Commit changes"
uses: EndBug/add-and-commit@v9
# Dispatch workflow
- uses: benc-uk/workflow-dispatch@v1
with:
author_name: 'Godot-Rust Automation'
author_email: '[email protected]'
message: 'Auto-reduce PNG sizes'
add: 'src/**/*.png'
#token: ${{ secrets.GITHUB_TOKEN }}
workflow: 'push-oxipng-image.yml'
inputs: '{ "repository": "${{ github.event.pull_request.head.repo.full_name }}", "branch": "${{ github.event.pull_request.head.ref }}" }'

0 comments on commit 90ae6e8

Please sign in to comment.