Skip to content

Commit dff6d9a

Browse files
blackheavenfrasertweedale
authored andcommitted
feature(ci): check advisories when they change
1 parent 160203f commit dff6d9a

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check advisories standalone
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
tools_changed:
7+
continue-on-error: true
8+
runs-on: ubuntu-22.04
9+
outputs:
10+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
11+
steps:
12+
- id: skip_check
13+
uses: fkirc/skip-duplicate-actions@master
14+
with:
15+
concurrent_skipping: "never"
16+
skip_after_successful_duplicate: "true"
17+
paths: '["code/**"]'
18+
advisories_changed:
19+
continue-on-error: true
20+
runs-on: ubuntu-22.04
21+
outputs:
22+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
23+
steps:
24+
- id: skip_check
25+
uses: fkirc/skip-duplicate-actions@master
26+
with:
27+
concurrent_skipping: "never"
28+
skip_after_successful_duplicate: "true"
29+
paths: '["advisories/**"]'
30+
do_not_skip: '["push", "workflow_dispatch", "schedule"]'
31+
check-advisories:
32+
name: Invoke check-advisories workflow
33+
needs: [tools_changed, advisories_changed]
34+
if: ${{ needs.tools_changed.outputs.should_skip == 'true' && needs.advisories_changed.outputs.should_skip != 'true' }}
35+
uses: ./.github/workflows/check-advisories.yml
36+
with:
37+
artifact-name: hsec-tools-main

.github/workflows/nix.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434
flake-lock-path: ./code/hsec-tools/flake.lock
3535
- run: nix -L build
3636
working-directory: ./code/hsec-tools
37+
- run: mkdir -p ~/.local/bin
38+
- run: cp code/hsec-tools/result/bin/hsec-tools ~/.local/bin
3739
- uses: actions/upload-artifact@v3
3840
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
3941
with:
4042
name: hsec-tools-main
41-
path: code/hsec-tools/result/bin/hsec-tools
43+
path: ~/.local/bin

0 commit comments

Comments
 (0)