Skip to content
Merged
31 changes: 22 additions & 9 deletions .github/workflows/_reusable_compress-images-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ on:
description: 'Name of the branch to create'
type: string
default: 'refactor/compressed-images'
secrets:
github-token:
description: 'GitHub token for Git operations and API calls'
required: true

jobs:
compress:
name: Compress images on ${{ github.ref_name }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Repo
uses: actions/checkout@v5
with:
token: ${{ secrets.github-token }}
token: ${{ secrets.BONITA_CI_PAT }}

- name: Setup git
id: git-setup
uses: bonitasoft/git-setup-action@v1
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}

- name: Compress Images
id: calibre
uses: calibreapp/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.github-token }}
GITHUB_TOKEN: ${{ secrets.BONITA_CI_PAT }}
compressOnly: true

- name: Create New Pull Request If Needed
Expand All @@ -41,5 +43,16 @@ jobs:
commit-message: 'refactor: compress images'
branch: ${{ inputs.branch-name }}
branch-suffix: 'timestamp'
body: ${{ steps.calibre.outputs.markdown }}
token: ${{ secrets.github-token }}
body: |
${{ steps.calibre.outputs.markdown }}

---

🔄 This PR has been automatically updated with the latest compressed images.

_Last updated: Run #${{ github.run_number }} (${{ github.run_id }})_
_Updated on: ${{ github.event.head_commit.timestamp }}_
token: ${{ secrets.BONITA_CI_PAT }}
author: ${{ steps.git-setup.outputs.name}} <${{ steps.git-setup.outputs.email}}>
committer: ${{ steps.git-setup.outputs.name}} <${{ steps.git-setup.outputs.email}}>
delete-branch: true
2 changes: 1 addition & 1 deletion .github/workflows/_reusable_compress-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# It doesn't allow `image-actions` to push to the related branch nor to create PR comment
if: ${{ github.event.pull_request_target || !github.event.pull_request.head.repo.fork }}
name: calibreapp/image-actions
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Repo
uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compress-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
permissions:
contents: write
pull-requests: write
uses: ./.github/workflows/_reusable_compress-images.yml
uses: ./.github/workflows/_reusable_compress-images.yml
2 changes: 0 additions & 2 deletions .github/workflows/compress-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ on:
jobs:
compress-images:
uses: ./.github/workflows/_reusable_compress-images-nightly.yml
secrets:
github-token: ${{ secrets.BONITA_CI_PAT }}
Loading