Fixes and updates

This commit is contained in:
Ismo Vuorinen
2022-11-28 16:03:17 +02:00
parent 5ecf13b121
commit b4fd76a206
3 changed files with 16 additions and 4 deletions

View File

@@ -1,5 +1,12 @@
name: Run Composer Install
on:
workflow_dispatch:
pull_request:
paths:
- 'composer.json'
- 'composer.lock'
jobs:
ComposerInstall:
runs-on: ubuntu-latest

View File

@@ -6,18 +6,20 @@ on:
schedule:
- cron: '00 23 * * 0'
jobs:
build:
CompressOnDemandOrSchedule:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
- name: Create New Pull Request If Needed
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v3

View File

@@ -9,7 +9,7 @@ on:
- '**.png'
- '**.webp'
jobs:
build:
CompressInPR:
# 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
@@ -21,6 +21,9 @@ jobs:
- name: Compress Images
uses: calibreapp/image-actions@main
with:
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is currently running the action. By default, the action cant update Pull Requests initiated from forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is
# currently running the action. By default, the action cant update Pull Requests initiated from
# forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and
# https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
githubToken: ${{ secrets.GITHUB_TOKEN }}