mirror of
https://github.com/immich-app/immich.git
synced 2025-09-29 15:31:13 -04:00
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Weblate checks
|
|
|
|
on:
|
|
pull_request_review:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
pre-job:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
should_run: ${{ steps.found_paths.outputs.i18n == 'true' }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
- id: found_paths
|
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
with:
|
|
filters: |
|
|
i18n:
|
|
- 'i18n/!(en)**\.json'
|
|
|
|
enforce-lock:
|
|
name: Check Weblate Lock
|
|
needs: [pre-job]
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
if: ${{ needs.pre-job.outputs.should_run == 'true' }}
|
|
steps:
|
|
- name: Bot review status
|
|
env:
|
|
PR_NUMBER: ${{ github.event.pull_request.number || github.event.pull_request_review.pull_request.number }}
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
# Then check for APPROVED by the bot, if absent fail
|
|
gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json reviews | jq -e '.reviews | map(select(.author.login == "github-actions[bot]" and .state == "APPROVED")) | length > 0' \
|
|
|| (echo "The push-o-matic bot has not approved this PR yet" && exit 1)
|
|
|
|
success-check-lock:
|
|
name: Weblate Lock Check Success
|
|
needs: [enforce-lock]
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
if: always()
|
|
steps:
|
|
- uses: immich-app/devtools/actions/success-check@68f10eb389bb02a3cf9d1156111964c549eb421b # 0.0.4
|
|
with:
|
|
needs: ${{ toJSON(needs) }}
|