-
Notifications
You must be signed in to change notification settings - Fork 12
61 lines (58 loc) · 1.67 KB
/
generatepyattckdata.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
name: Generate ATT&CK Data
on:
schedule:
- cron: "0 3 1,15 * *"
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.5.1"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: write
steps:
- uses: actions/[email protected]
- name: Set up Python Environment
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
pip --version
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Generate new data_collector data
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry config virtualenvs.create false
poetry install
cd data_collector
poetry config virtualenvs.create false
poetry install
poetry run python run.py
- name: Commit and push changes
run: |
git config --global user.name "MSAdministrator"
git config --global user.email "[email protected]"
git add -A
git commit -m "commit message"
git push
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.SWIMLANE_PYATTCK_ROLE }}
aws-region: us-west-2
- name: Upload files to S3 with AWS CLI
run: |
aws s3 cp generated_attck_data_v3.json s3://${{ secrets.SWIMLANE_PYATTCK_AWS_BUCKET_NAME }} --acl public-read