mirror of
https://github.com/immich-app/immich.git
synced 2025-09-29 15:31:13 -04:00
* add npm prettier dep and format script to .github folder * initial work on prettier formatting test * attempt index notation * change name of .github job to be valid * another use of index notation this is getting overcomplicated * Change job ID to `github-files-formatting` and chane the name to `.github Files Checks` * Change job name to `.github Files Formatting` * Update Makefile with .github module and `filter-out`s * run prettier formatting as added in this PR
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: Weblate checks
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
pre-job:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_run: ${{ steps.found_paths.outputs.i18n == 'true' && github.head_ref != 'chore/translations'}}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
- id: found_paths
|
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
|
with:
|
|
filters: |
|
|
i18n:
|
|
- 'i18n/!(en)**\.json'
|
|
- name: Debug
|
|
run: |
|
|
echo "Should run: ${{ steps.found_paths.outputs.i18n == 'true' && github.head_ref != 'chore/translations'}}"
|
|
echo "Found i18n paths: ${{ steps.found_paths.outputs.i18n }}"
|
|
echo "Head ref: ${{ github.head_ref }}"
|
|
|
|
enforce-lock:
|
|
name: Check Weblate Lock
|
|
needs: [pre-job]
|
|
runs-on: ubuntu-latest
|
|
if: ${{ needs.pre-job.outputs.should_run == 'true' }}
|
|
steps:
|
|
- name: Check weblate lock
|
|
run: |
|
|
if [[ "false" = $(curl https://hosted.weblate.org/api/components/immich/immich/lock/ | jq .locked) ]]; then
|
|
exit 1
|
|
fi
|
|
- name: Find Pull Request
|
|
uses: juliangruber/find-pull-request-action@48b6133aa6c826f267ebd33aa2d29470f9d9e7d0 # v1
|
|
id: find-pr
|
|
with:
|
|
branch: chore/translations
|
|
- name: Fail if existing weblate PR
|
|
if: ${{ steps.find-pr.outputs.number }}
|
|
run: exit 1
|
|
success-check-lock:
|
|
name: Weblate Lock Check Success
|
|
needs: [enforce-lock]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Any jobs failed?
|
|
if: ${{ contains(needs.*.result, 'failure') }}
|
|
run: exit 1
|
|
- name: All jobs passed or skipped
|
|
if: ${{ !(contains(needs.*.result, 'failure')) }}
|
|
run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"
|