Skip to content

chore(deps): update actions/github-script action to v7 #20

chore(deps): update actions/github-script action to v7

chore(deps): update actions/github-script action to v7 #20

name: Optimize and merge
on: pull_request
jobs:
compress-images:
name: Compress repository images
runs-on: ubuntu-latest
if: |
!contains(github.event.pull_request.title, '[skip ci]') &&
!startsWith(github.head_ref, 'chore')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Optimize with Calibre's image actions
uses: calibreapp/image-actions@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Wait images optimization
run: sleep 120
auto-merge:
name: Auto merge dependencies PRs
runs-on: ubuntu-latest
if: |
github.actor == 'renovate[bot]' ||
github.actor == 'renovate-preview[bot]'
steps:
- name: Squash and merge
if: |
contains(github.event.pull_request.body, 'Automerge**: Enabled')
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
merge_method: 'squash'
})