github: Reduce actions trigger on metadata updates

This commit is contained in:
Valentin Tolmer 2023-03-27 14:19:11 +02:00 committed by nitnelave
parent 36a51070b3
commit 866a74fa29
2 changed files with 20 additions and 2 deletions

View File

@ -60,8 +60,25 @@ env:
# cache based on Cargo.lock per cargo target # cache based on Cargo.lock per cargo target
jobs: jobs:
pre_job:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'outdated_runs'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/*.md", "**/docs/**", "example_configs/**", "*.sh", ".gitignore", "lldap_config.docker_template.toml"]'
do_not_skip: '["workflow_dispatch", "schedule"]'
cancel_others: true
build-ui: build-ui:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
container: container:
image: nitnelave/rust-dev:latest image: nitnelave/rust-dev:latest
steps: steps:
@ -99,6 +116,8 @@ jobs:
build-bin: build-bin:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
strategy: strategy:
matrix: matrix:
target: [armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-musl, x86_64-unknown-linux-musl] target: [armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-musl, x86_64-unknown-linux-musl]

View File

@ -13,7 +13,6 @@ jobs:
pre_job: pre_job:
continue-on-error: true continue-on-error: true
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Map a step output to a job output
outputs: outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }} should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps: steps:
@ -22,7 +21,7 @@ jobs:
with: with:
concurrent_skipping: 'outdated_runs' concurrent_skipping: 'outdated_runs'
skip_after_successful_duplicate: 'true' skip_after_successful_duplicate: 'true'
paths_ignore: '["**/*.md", "**/docs/**", "example_configs/**", "*.sh"]' paths_ignore: '["**/*.md", "**/docs/**", "example_configs/**", "*.sh", ".dockerignore", ".gitignore", "lldap_config.docker_template.toml", "Dockerfile"]'
do_not_skip: '["workflow_dispatch", "schedule"]' do_not_skip: '["workflow_dispatch", "schedule"]'
cancel_others: true cancel_others: true