mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	feat: shared pre-job action (#20011)
This commit is contained in:
		
							parent
							
								
									9ae42106cc
								
							
						
					
					
						commit
						c37d13691b
					
				
							
								
								
									
										22
									
								
								.github/workflows/build-mobile.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/build-mobile.yml
									
									
									
									
										vendored
									
									
								
							@ -32,24 +32,18 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      should_run: ${{ steps.found_paths.outputs.mobile == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					      should_run: ${{ steps.check.outputs.should_run }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Check what should run
 | 
				
			||||||
        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
 | 
					        id: check
 | 
				
			||||||
        with:
 | 
					        uses: immich-app/devtools/actions/pre-job@24820aa4ef67959b0dcf69a438cccf00d7c7042b # pre-job-action-v1.0.1
 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - id: found_paths
 | 
					 | 
				
			||||||
        uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filters: |
 | 
					          filters: |
 | 
				
			||||||
            mobile:
 | 
					            mobile:
 | 
				
			||||||
              - 'mobile/**'
 | 
					              - 'mobile/**'
 | 
				
			||||||
            workflow:
 | 
					          force-filters: |
 | 
				
			||||||
              - '.github/workflows/build-mobile.yml'
 | 
					            - '.github/workflows/build-mobile.yml'
 | 
				
			||||||
      - name: Check if we should force jobs to run
 | 
					          force-events: 'workflow_call,workflow_dispatch'
 | 
				
			||||||
        id: should_force
 | 
					 | 
				
			||||||
        run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' }}" >> "$GITHUB_OUTPUT"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  build-sign-android:
 | 
					  build-sign-android:
 | 
				
			||||||
    name: Build and sign Android
 | 
					    name: Build and sign Android
 | 
				
			||||||
@ -57,7 +51,7 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    # Skip when PR from a fork
 | 
					    # Skip when PR from a fork
 | 
				
			||||||
    if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && needs.pre-job.outputs.should_run == 'true' }}
 | 
					    if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && fromJSON(needs.pre-job.outputs.should_run).mobile == true }}
 | 
				
			||||||
    runs-on: mich
 | 
					    runs-on: mich
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										33
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@ -20,15 +20,11 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      should_run_server: ${{ steps.found_paths.outputs.server == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					      should_run: ${{ steps.check.outputs.should_run }}
 | 
				
			||||||
      should_run_ml: ${{ steps.found_paths.outputs.machine-learning == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Check what should run
 | 
				
			||||||
        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
 | 
					        id: check
 | 
				
			||||||
        with:
 | 
					        uses: immich-app/devtools/actions/pre-job@24820aa4ef67959b0dcf69a438cccf00d7c7042b # pre-job-action-v1.0.1
 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
      - id: found_paths
 | 
					 | 
				
			||||||
        uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filters: |
 | 
					          filters: |
 | 
				
			||||||
            server:
 | 
					            server:
 | 
				
			||||||
@ -38,14 +34,11 @@ jobs:
 | 
				
			|||||||
              - 'i18n/**'
 | 
					              - 'i18n/**'
 | 
				
			||||||
            machine-learning:
 | 
					            machine-learning:
 | 
				
			||||||
              - 'machine-learning/**'
 | 
					              - 'machine-learning/**'
 | 
				
			||||||
            workflow:
 | 
					          force-filters: |
 | 
				
			||||||
              - '.github/workflows/docker.yml'
 | 
					            - '.github/workflows/docker.yml'
 | 
				
			||||||
              - '.github/workflows/multi-runner-build.yml'
 | 
					            - '.github/workflows/multi-runner-build.yml'
 | 
				
			||||||
              - '.github/actions/image-build'
 | 
					            - '.github/actions/image-build'
 | 
				
			||||||
 | 
					          force-events: 'workflow_dispatch,release'
 | 
				
			||||||
      - name: Check if we should force jobs to run
 | 
					 | 
				
			||||||
        id: should_force
 | 
					 | 
				
			||||||
        run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  retag_ml:
 | 
					  retag_ml:
 | 
				
			||||||
    name: Re-Tag ML
 | 
					    name: Re-Tag ML
 | 
				
			||||||
@ -53,7 +46,7 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
      packages: write
 | 
					      packages: write
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_ml == 'false' && !github.event.pull_request.head.repo.fork }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).machine-learning == false && !github.event.pull_request.head.repo.fork }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
@ -82,7 +75,7 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
      packages: write
 | 
					      packages: write
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_server == 'false' && !github.event.pull_request.head.repo.fork }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).server == false && !github.event.pull_request.head.repo.fork }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
@ -108,7 +101,7 @@ jobs:
 | 
				
			|||||||
  machine-learning:
 | 
					  machine-learning:
 | 
				
			||||||
    name: Build and Push ML
 | 
					    name: Build and Push ML
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_ml == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).machine-learning == true }}
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      fail-fast: false
 | 
					      fail-fast: false
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
@ -153,7 +146,7 @@ jobs:
 | 
				
			|||||||
  server:
 | 
					  server:
 | 
				
			||||||
    name: Build and Push Server
 | 
					    name: Build and Push Server
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_server == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).server == true }}
 | 
				
			||||||
    uses: immich-app/devtools/.github/workflows/multi-runner-build.yml@129aeda75a450666ce96e8bc8126652e717917a7 # multi-runner-build-workflow-0.1.1
 | 
					    uses: immich-app/devtools/.github/workflows/multi-runner-build.yml@129aeda75a450666ce96e8bc8126652e717917a7 # multi-runner-build-workflow-0.1.1
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										22
									
								
								.github/workflows/docs-build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/docs-build.yml
									
									
									
									
										vendored
									
									
								
							@ -18,32 +18,28 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      should_run: ${{ steps.found_paths.outputs.docs == 'true' || steps.found_paths.outputs.open-api == 'true' ||  steps.should_force.outputs.should_force == 'true' }}
 | 
					      should_run: ${{ steps.check.outputs.should_run }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Check what should run
 | 
				
			||||||
        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
 | 
					        id: check
 | 
				
			||||||
        with:
 | 
					        uses: immich-app/devtools/actions/pre-job@24820aa4ef67959b0dcf69a438cccf00d7c7042b # pre-job-action-v1.0.1
 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
      - id: found_paths
 | 
					 | 
				
			||||||
        uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filters: |
 | 
					          filters: |
 | 
				
			||||||
            docs:
 | 
					            docs:
 | 
				
			||||||
              - 'docs/**'
 | 
					              - 'docs/**'
 | 
				
			||||||
            workflow:
 | 
					 | 
				
			||||||
              - '.github/workflows/docs-build.yml'
 | 
					 | 
				
			||||||
            open-api:
 | 
					            open-api:
 | 
				
			||||||
              - 'open-api/immich-openapi-specs.json'
 | 
					              - 'open-api/immich-openapi-specs.json'
 | 
				
			||||||
      - name: Check if we should force jobs to run
 | 
					          force-filters: |
 | 
				
			||||||
        id: should_force
 | 
					            - '.github/workflows/docs-build.yml'
 | 
				
			||||||
        run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'release' || github.ref_name == 'main' }}" >> "$GITHUB_OUTPUT"
 | 
					          force-events: 'release'
 | 
				
			||||||
 | 
					          force-branches: 'main'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
    name: Docs Build
 | 
					    name: Docs Build
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).docs == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    defaults:
 | 
					    defaults:
 | 
				
			||||||
      run:
 | 
					      run:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										21
									
								
								.github/workflows/static_analysis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/static_analysis.yml
									
									
									
									
										vendored
									
									
								
							@ -17,28 +17,23 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      should_run: ${{ steps.found_paths.outputs.mobile == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					      should_run: ${{ steps.check.outputs.should_run }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Check what should run
 | 
				
			||||||
        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
 | 
					        id: check
 | 
				
			||||||
        with:
 | 
					        uses: immich-app/devtools/actions/pre-job@24820aa4ef67959b0dcf69a438cccf00d7c7042b # pre-job-action-v1.0.1
 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
      - id: found_paths
 | 
					 | 
				
			||||||
        uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filters: |
 | 
					          filters: |
 | 
				
			||||||
            mobile:
 | 
					            mobile:
 | 
				
			||||||
              - 'mobile/**'
 | 
					              - 'mobile/**'
 | 
				
			||||||
            workflow:
 | 
					          force-filters: |
 | 
				
			||||||
              - '.github/workflows/static_analysis.yml'
 | 
					            - '.github/workflows/static_analysis.yml'
 | 
				
			||||||
      - name: Check if we should force jobs to run
 | 
					          force-events: 'workflow_dispatch,release'
 | 
				
			||||||
        id: should_force
 | 
					 | 
				
			||||||
        run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  mobile-dart-analyze:
 | 
					  mobile-dart-analyze:
 | 
				
			||||||
    name: Run Dart Code Analysis
 | 
					    name: Run Dart Code Analysis
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).mobile == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										55
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										55
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							@ -14,23 +14,11 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      should_run_i18n: ${{ steps.found_paths.outputs.i18n == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					      should_run: ${{ steps.check.outputs.should_run }}
 | 
				
			||||||
      should_run_web: ${{ steps.found_paths.outputs.web == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_server: ${{ steps.found_paths.outputs.server == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_cli: ${{ steps.found_paths.outputs.cli == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_e2e: ${{ steps.found_paths.outputs.e2e == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_mobile: ${{ steps.found_paths.outputs.mobile == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_ml: ${{ steps.found_paths.outputs.machine-learning == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_e2e_web: ${{ steps.found_paths.outputs.e2e == 'true' || steps.found_paths.outputs.web == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_e2e_server_cli: ${{ steps.found_paths.outputs.e2e == 'true' || steps.found_paths.outputs.server == 'true' || steps.found_paths.outputs.cli == 'true' || steps.should_force.outputs.should_force == 'true' }}
 | 
					 | 
				
			||||||
      should_run_.github: ${{ steps.found_paths.outputs['.github'] == 'true' || steps.should_force.outputs.should_force == 'true' }} # redundant to have should_force but if someone changes the trigger then this won't have to be changed
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Check what should run
 | 
				
			||||||
        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
 | 
					        id: check
 | 
				
			||||||
        with:
 | 
					        uses: immich-app/devtools/actions/pre-job@24820aa4ef67959b0dcf69a438cccf00d7c7042b # pre-job-action-v1.0.1
 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
      - id: found_paths
 | 
					 | 
				
			||||||
        uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filters: |
 | 
					          filters: |
 | 
				
			||||||
            i18n:
 | 
					            i18n:
 | 
				
			||||||
@ -50,17 +38,16 @@ jobs:
 | 
				
			|||||||
              - 'mobile/**'
 | 
					              - 'mobile/**'
 | 
				
			||||||
            machine-learning:
 | 
					            machine-learning:
 | 
				
			||||||
              - 'machine-learning/**'
 | 
					              - 'machine-learning/**'
 | 
				
			||||||
            workflow:
 | 
					 | 
				
			||||||
              - '.github/workflows/test.yml'
 | 
					 | 
				
			||||||
            .github:
 | 
					            .github:
 | 
				
			||||||
              - '.github/**'
 | 
					              - '.github/**'
 | 
				
			||||||
      - name: Check if we should force jobs to run
 | 
					          force-filters: |
 | 
				
			||||||
        id: should_force
 | 
					            - '.github/workflows/test.yml'
 | 
				
			||||||
        run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'workflow_dispatch' }}" >> "$GITHUB_OUTPUT"
 | 
					          force-events: 'workflow_dispatch'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  server-unit-tests:
 | 
					  server-unit-tests:
 | 
				
			||||||
    name: Test & Lint Server
 | 
					    name: Test & Lint Server
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_server == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).server == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -97,7 +84,7 @@ jobs:
 | 
				
			|||||||
  cli-unit-tests:
 | 
					  cli-unit-tests:
 | 
				
			||||||
    name: Unit Test CLI
 | 
					    name: Unit Test CLI
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_cli == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).cli == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -137,7 +124,7 @@ jobs:
 | 
				
			|||||||
  cli-unit-tests-win:
 | 
					  cli-unit-tests-win:
 | 
				
			||||||
    name: Unit Test CLI (Windows)
 | 
					    name: Unit Test CLI (Windows)
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_cli == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).cli == true }}
 | 
				
			||||||
    runs-on: windows-latest
 | 
					    runs-on: windows-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -172,7 +159,7 @@ jobs:
 | 
				
			|||||||
  web-lint:
 | 
					  web-lint:
 | 
				
			||||||
    name: Lint Web
 | 
					    name: Lint Web
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_web == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).web == true }}
 | 
				
			||||||
    runs-on: mich
 | 
					    runs-on: mich
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -209,7 +196,7 @@ jobs:
 | 
				
			|||||||
  web-unit-tests:
 | 
					  web-unit-tests:
 | 
				
			||||||
    name: Test Web
 | 
					    name: Test Web
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_web == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).web == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -243,7 +230,7 @@ jobs:
 | 
				
			|||||||
  i18n-tests:
 | 
					  i18n-tests:
 | 
				
			||||||
    name: Test i18n
 | 
					    name: Test i18n
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_i18n == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).i18n == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -281,7 +268,7 @@ jobs:
 | 
				
			|||||||
  e2e-tests-lint:
 | 
					  e2e-tests-lint:
 | 
				
			||||||
    name: End-to-End Lint
 | 
					    name: End-to-End Lint
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_e2e == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).e2e == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -320,7 +307,7 @@ jobs:
 | 
				
			|||||||
  server-medium-tests:
 | 
					  server-medium-tests:
 | 
				
			||||||
    name: Medium Tests (Server)
 | 
					    name: Medium Tests (Server)
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_server == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).server == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -348,7 +335,7 @@ jobs:
 | 
				
			|||||||
  e2e-tests-server-cli:
 | 
					  e2e-tests-server-cli:
 | 
				
			||||||
    name: End-to-End Tests (Server & CLI)
 | 
					    name: End-to-End Tests (Server & CLI)
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_e2e_server_cli == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).e2e == true || fromJSON(needs.pre-job.outputs.should_run).server == true || fromJSON(needs.pre-job.outputs.should_run).cli == true }}
 | 
				
			||||||
    runs-on: ${{ matrix.runner }}
 | 
					    runs-on: ${{ matrix.runner }}
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -396,7 +383,7 @@ jobs:
 | 
				
			|||||||
  e2e-tests-web:
 | 
					  e2e-tests-web:
 | 
				
			||||||
    name: End-to-End Tests (Web)
 | 
					    name: End-to-End Tests (Web)
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_e2e_web == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).e2e == true || fromJSON(needs.pre-job.outputs.should_run).web == true }}
 | 
				
			||||||
    runs-on: ${{ matrix.runner }}
 | 
					    runs-on: ${{ matrix.runner }}
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -449,7 +436,7 @@ jobs:
 | 
				
			|||||||
  mobile-unit-tests:
 | 
					  mobile-unit-tests:
 | 
				
			||||||
    name: Unit Test Mobile
 | 
					    name: Unit Test Mobile
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_mobile == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).mobile == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -471,7 +458,7 @@ jobs:
 | 
				
			|||||||
  ml-unit-tests:
 | 
					  ml-unit-tests:
 | 
				
			||||||
    name: Unit Test ML
 | 
					    name: Unit Test ML
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run_ml == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).machine-learning == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
@ -507,7 +494,7 @@ jobs:
 | 
				
			|||||||
  github-files-formatting:
 | 
					  github-files-formatting:
 | 
				
			||||||
    name: .github Files Formatting
 | 
					    name: .github Files Formatting
 | 
				
			||||||
    needs: pre-job
 | 
					    needs: pre-job
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs['should_run_.github'] == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run)['.github'] == true }}
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										15
									
								
								.github/workflows/weblate-lock.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/weblate-lock.yml
									
									
									
									
										vendored
									
									
								
							@ -21,25 +21,24 @@ jobs:
 | 
				
			|||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
      contents: read
 | 
					      contents: read
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      should_run: ${{ steps.found_paths.outputs.i18n == 'true' }}
 | 
					      should_run: ${{ steps.check.outputs.should_run }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout code
 | 
					      - name: Check what should run
 | 
				
			||||||
        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
 | 
					        id: check
 | 
				
			||||||
        with:
 | 
					        uses: immich-app/devtools/actions/pre-job@24820aa4ef67959b0dcf69a438cccf00d7c7042b # pre-job-action-v1.0.1
 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
      - id: found_paths
 | 
					 | 
				
			||||||
        uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filters: |
 | 
					          filters: |
 | 
				
			||||||
            i18n:
 | 
					            i18n:
 | 
				
			||||||
              - 'i18n/!(en)**\.json'
 | 
					              - 'i18n/!(en)**\.json'
 | 
				
			||||||
 | 
					          exclude-branches: 'chore/translations'
 | 
				
			||||||
 | 
					          skip-force-logic: 'true'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  enforce-lock:
 | 
					  enforce-lock:
 | 
				
			||||||
    name: Check Weblate Lock
 | 
					    name: Check Weblate Lock
 | 
				
			||||||
    needs: [pre-job]
 | 
					    needs: [pre-job]
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    permissions: {}
 | 
					    permissions: {}
 | 
				
			||||||
    if: ${{ needs.pre-job.outputs.should_run == 'true' }}
 | 
					    if: ${{ fromJSON(needs.pre-job.outputs.should_run).i18n == true }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Bot review status
 | 
					      - name: Bot review status
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user