This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
68 lines (59 loc) · 1.75 KB
/
nightly-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
name: nightly-build
on:
schedule:
- cron: "0 2 * * *"
push:
branches:
- 'main'
jobs:
nightly:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout security_content_docs
uses: actions/checkout@v3
- name: install python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: "x64"
- name: install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: install dependencies
run: poetry install --no-interaction
- name: clone splunk security content
uses: actions/checkout@v3
with:
repository: splunk/security_content
path: 'security_content'
- name: clone mtire cti
uses: actions/checkout@v3
with:
repository: mitre/cti
path: 'cti'
- name: run site_gen.py
run: |
poetry run python bin/site_gen.py
- name: update github with new site
run: |
# configure git to prep for commit
rm -rf cti
rm -rf security_content
git config user.email "research@splunk.com"
git config user.name "publish bot"
git config --global push.default simple
git add _posts/
git add _stories/
git add _pages/
git add _data/
git add _playbooks/
git add index.markdown
git commit --allow-empty -m "updating research.splunk.com site bits [ci skip]"
# push quietly to prevent showing the token in log
# no need to provide any credentials
git push