-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (54 loc) · 2.16 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build
on: [push, pull_request]
jobs:
# -- TESTS ------------------------------------------------------------------
tests:
runs-on: ubuntu-latest
steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@3d32f8d8b29ef98868a6dc8d0cea43bfbca531f5
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Run ansible-lint
uses: ansible-community/ansible-lint-action@9b022b66407018ebb6d44c904f4a386766d34368 # v6.14.4
# -- SAST SCAN --------------------------------------------------------------
code-security:
runs-on: ubuntu-latest
needs: tests
# Skip any PR created by dependabot to avoid permission issues
if: (github.actor != 'dependabot[bot]')
steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@3d32f8d8b29ef98868a6dc8d0cea43bfbca531f5
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Perform Scan
uses: ShiftLeftSecurity/scan-action@master
env:
WORKSPACE: https://github.com/${{ github.repository }}/blob/${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCAN_ANNOTATE_PR: true
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: reports
path: reports
# -- RELEASE ----------------------------------------------------------------
release:
runs-on: ubuntu-latest
needs: code-security
if: github.ref == 'refs/heads/master'
steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@3d32f8d8b29ef98868a6dc8d0cea43bfbca531f5
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Semantic Release
uses: cycjimmy/semantic-release-action@8e58d20d0f6c8773181f43eb74d6a05e3099571d # v3.4.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}