mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 03:19:51 +03:00
8caceee8fa
ci: bump calibreapp/image-actions Bumps [calibreapp/image-actions](https://github.com/calibreapp/image-actions) from 420075c115b26f8785e293c5bd5bef0911c506e5 to d9c8ee5c3dc52ae4622c82ead88d658f4b16b65f. - [Release notes](https://github.com/calibreapp/image-actions/releases) - [Commits](https://github.com/calibreapp/image-actions/compare/420075c115b26f8785e293c5bd5bef0911c506e5...d9c8ee5c3dc52ae4622c82ead88d658f4b16b65f) --- updated-dependencies: - dependency-name: calibreapp/image-actions dependency-version: d9c8ee5c3dc52ae4622c82ead88d658f4b16b65f dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
63 lines
2.2 KiB
YAML
63 lines
2.2 KiB
YAML
---
|
|
name: Gen - Compress images
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "**.jpg"
|
|
- "**.jpeg"
|
|
- "**.png"
|
|
- "**.webp"
|
|
pull_request:
|
|
paths:
|
|
- "**.jpg"
|
|
- "**.jpeg"
|
|
- "**.png"
|
|
- "**.webp"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
compress:
|
|
name: compress
|
|
runs-on: ubuntu-latest
|
|
# Don't run on forks. Token will not be available. Will run on main and open a PR anyway
|
|
if: |
|
|
github.repository == 'goauthentik/authentik' &&
|
|
(github.event_name != 'pull_request' ||
|
|
github.event.pull_request.head.repo.full_name == github.repository)
|
|
steps:
|
|
- id: generate_token
|
|
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
|
|
with:
|
|
app-id: ${{ secrets.GH_APP_ID }}
|
|
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
- name: Compress images
|
|
id: compress
|
|
uses: calibreapp/image-actions@d9c8ee5c3dc52ae4622c82ead88d658f4b16b65f # main
|
|
with:
|
|
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
|
compressOnly: ${{ github.event_name != 'pull_request' }}
|
|
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
|
|
if: "${{ github.event_name != 'pull_request' && steps.compress.outputs.markdown != '' }}"
|
|
id: cpr
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
title: "*: Auto compress images"
|
|
branch-suffix: timestamp
|
|
commit-message: "*: compress images"
|
|
body: ${{ steps.compress.outputs.markdown }}
|
|
delete-branch: true
|
|
signoff: true
|
|
labels: dependencies
|
|
- uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3
|
|
if: "${{ github.event_name != 'pull_request' && steps.compress.outputs.markdown != '' }}"
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
|
merge-method: squash
|