Github Action for Image compression not running

Hi I have Github Pages website and the images are giving bad performance reviews on Google Lighthouse due to their size but I don’t want to manually compress everything for every image I upload.

So I am using a Github Action to auto-compress every image I upload but it is not running and I do not know where I have gone wrong here. I will attempt to explain what I am doing in this snippet of code.

So this is the first snippet that came from the Calibre Image Actions. I wish I could somehow debug the action on Github as that’s where they tell you to create the Workflow.

I feel like I am missing something very simple. All I need was to ensure it runs on push. I notice the Github Token doesn’t need to be set manually on Github as it only runs when I enable Github Actions.

Except with me. Can anyone tell me what I am missing, please?

name: Compress Images
    # Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
    # See for reference.
      - '**.jpg'
      - '**.jpeg'
      - '**.png'
      - '**.webp'
    # Only run on Pull Requests within the same repository, and not from forks.
    if: github.event.pull_request.head.repo.full_name == github.repository
    name: calibreapp/image-actions
    runs-on: ubuntu-latest
      - name: Checkout Repo
        uses: actions/checkout@v2

      - name: Compress Images
        uses: calibreapp/image-actions@main
          # The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is currently running the action. By default, the action can’t update Pull Requests initiated from forked repositories.
          # See and
          githubToken: ${{ secrets.GITHUB_TOKEN }}

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.