Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

nightly-build

nightly-build #707

Workflow file for this run

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