-
Notifications
You must be signed in to change notification settings - Fork 359
45 lines (39 loc) · 1.58 KB
/
validate-and-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
name: validate-and-build
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
validate-and-build:
#Note that the CircleCI job used a Container. The way to do this with Github Actions
#is to first start up a Virtual Machine, then we can by following:
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer
runs-on: ubuntu-latest
steps:
- name: Check out the repository code
uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.11' #Available versions here - https://github.com/actions/python-versions/releases easy to change/make a matrix/use pypy
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install System Packages
run: |
sudo apt update -qq
sudo apt install jq -qq
- name: Install Python Dependencies and ContentCTL and Atomic Red Team
run: |
pip install contentctl
git clone --depth=1 --single-branch --branch=master https://github.com/redcanaryco/atomic-red-team.git
- name: Running validate
run: |
contentctl validate
- name: Running build with enrichments
run: |
contentctl build --enrichments
mkdir artifacts
mv dist/DA-ESS-ContentUpdate-latest.tar.gz artifacts/
- name: store_artifacts
uses: actions/upload-artifact@v4
with:
name: content-latest
path: |
artifacts/DA-ESS-ContentUpdate-latest.tar.gz