Skip to content

Commit facddc7

Browse files
author
Måns Thörnvik
committed
update WF structure
1 parent d377b49 commit facddc7

5 files changed

Lines changed: 42 additions & 92 deletions

File tree

.github/workflows/callable-static-analysis.yaml renamed to .github/workflows/code-scanning.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
name: Static analysis
1+
name: Code scanning
2+
3+
run-name: Code scanning - ${{ github.event.pull_request.title || github.event.head_commit.message }}
24

35
on:
4-
workflow_call:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
512

613
permissions:
714
contents: read
815
security-events: write
916

1017
jobs:
11-
lint:
18+
golangci-lint:
1219
runs-on: ubuntu-latest
1320
steps:
1421
- name: Checkout
@@ -22,11 +29,11 @@ jobs:
2229
--output.sarif.path golangci-lint-report.sarif
2330
2431
- name: Upload linting SARIF
25-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
32+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
2633
with:
2734
sarif_file: golangci-lint-report.sarif
2835

29-
vulncheck:
36+
govulncheck:
3037
runs-on: ubuntu-latest
3138
steps:
3239
- name: Checkout
@@ -39,10 +46,10 @@ jobs:
3946
cache-dependency-path: tools/go.sum
4047

4148
- name: Run vulnerability scan
42-
continue-on-error: true
4349
run: make vulncheck-sarif
4450

4551
- name: Upload vulnerability SARIF
46-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
52+
if: always()
53+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
4754
with:
4855
sarif_file: build/govulncheck-report.sarif

.github/workflows/codeql.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
name: Main branch protection
22

3+
run-name: "Main branch protection: ${{ github.event.head_commit.message }}"
4+
35
on:
6+
workflow_dispatch:
47
push:
58
branches:
69
- main
7-
pull_request:
8-
branches:
9-
- main
1010

1111
# Should prevent concurrency on a per-branch basis.
1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref_name }}
14-
cancel-in-progress: ${{ github.ref_name != 'main' }}
14+
cancel-in-progress: false
1515

1616
permissions:
17-
checks: write
1817
contents: read
19-
security-events: write
2018

2119
jobs:
22-
static-analysis:
23-
uses: ./.github/workflows/callable-static-analysis.yaml
24-
secrets: inherit
25-
2620
test:
2721
uses: ./.github/workflows/callable-test.yaml
2822
secrets: inherit
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Pull request validation
2+
3+
run-name: "Pull request validation: ${{ github.event.pull_request.title }}"
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref_name }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
test:
19+
uses: ./.github/workflows/callable-test.yaml
20+
secrets: inherit
21+
22+
build:
23+
uses: ./.github/workflows/callable-build.yaml
24+
secrets: inherit

.github/workflows/release.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)