Skip to content

Commit

Permalink
ci: add de-duplicate steps in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yld-weng committed Jan 20, 2022
1 parent 40ccb6a commit fe69d7d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -4,21 +4,36 @@ on:
push:
branches-ignore: [ master ]
pull_request:
branches: [ '**' ]
branches: [ 'master', 'development' ]
types: [
opened,
synchronize,
reopened ]
workflow_dispatch:
inputs:
Name:
description: 'A name for this re-run'
required: true
default: 'Re-run the workflow'
Description:
description: 'A description for this re-run'
required: false
default: ''

jobs:
Check-Duplicate:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
skip_after_successful_duplicate: 'true'

CI-Build:
needs: Check-Duplicate
if: ${{ needs.Check-Duplicate.outputs.should_skip != 'true' }}
runs-on: windows-latest
defaults:
run:
Expand Down Expand Up @@ -71,6 +86,8 @@ jobs:
run: npm run serve & npm run test:e2e

Test:
needs: Check-Duplicate
if: ${{ needs.Check-Duplicate.outputs.should_skip != 'true' }}
runs-on: windows-latest
defaults:
run:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -12,8 +12,6 @@
name: "CodeQL"

on:
push:
branches: [ development ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ development, master ]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Expand Up @@ -8,9 +8,12 @@ on:
workflow_dispatch:
inputs:
Name:
description: 'A name for this re-run'
required: true
default: 'Re-run the workflow'
Description:
description: 'A description for this re-run'
required: false
default: ''

jobs:
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/scan.yml
Expand Up @@ -4,22 +4,37 @@ on:
push:
branches: [ development ]
pull_request:
branches: [ '**' ]
branches: [ 'master', 'development' ]
types: [
opened,
synchronize,
reopened ]
workflow_dispatch:
inputs:
Name:
description: 'A name for this re-run'
required: true
default: 'Re-run the workflow'
Description:
description: 'A description for this re-run'
required: false
default: ''


jobs:
Check-Duplicate:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
skip_after_successful_duplicate: 'true'

scan:
needs: Check-Duplicate
if: ${{ needs.Check-Duplicate.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit fe69d7d

Please sign in to comment.