diff --git a/.github/workflows/_reusable_compress-images-nightly.yml b/.github/workflows/_reusable_compress-images-nightly.yml index 9df29e80b..504ffed77 100644 --- a/.github/workflows/_reusable_compress-images-nightly.yml +++ b/.github/workflows/_reusable_compress-images-nightly.yml @@ -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/image-actions@1.4.1 with: - GITHUB_TOKEN: ${{ secrets.github-token }} + GITHUB_TOKEN: ${{ secrets.BONITA_CI_PAT }} compressOnly: true - name: Create New Pull Request If Needed @@ -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 diff --git a/.github/workflows/_reusable_compress-images.yml b/.github/workflows/_reusable_compress-images.yml index 9113336af..deba9e1d6 100644 --- a/.github/workflows/_reusable_compress-images.yml +++ b/.github/workflows/_reusable_compress-images.yml @@ -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 diff --git a/.github/workflows/compress-image.yml b/.github/workflows/compress-image.yml index 2e47b7223..a5c66d9ef 100644 --- a/.github/workflows/compress-image.yml +++ b/.github/workflows/compress-image.yml @@ -15,4 +15,4 @@ jobs: permissions: contents: write pull-requests: write - uses: ./.github/workflows/_reusable_compress-images.yml \ No newline at end of file + uses: ./.github/workflows/_reusable_compress-images.yml diff --git a/.github/workflows/compress-nightly.yml b/.github/workflows/compress-nightly.yml index 057856ec8..74fb70df6 100644 --- a/.github/workflows/compress-nightly.yml +++ b/.github/workflows/compress-nightly.yml @@ -8,5 +8,3 @@ on: jobs: compress-images: uses: ./.github/workflows/_reusable_compress-images-nightly.yml - secrets: - github-token: ${{ secrets.BONITA_CI_PAT }}