You need to create a Personal access token with those permission to open a pull request automatically.
Then please add the personal access token to your
repository secrets
with an easily recognizable name. For example, imgoptimizer_ACCESS_TOKEN
.
To run this GitHub Actions, please add the following lines to your
.github/workflows/imgoptimizer.yml
:
name: imgoptimizer
on:
push:
branches:
- main
- master
jobs:
imgoptimizer:
runs-on: ubuntu-latest
steps:
- uses: mthsmb/imgoptimizer@v2.0.2
with:
token: ${{ secrets.imgoptimizer_ACCESS_TOKEN }}