Repository navigation
63 lines (53 loc) · 2.52 KB
/
Copy pathdatasource-dependabot.yml
File metadata and controls
63 lines (53 loc) · 2.52 KB
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
name: Splunk TA Update
on:
workflow_dispatch: # Manually trigger the workflow
schedule:
- cron: '55 06 * * *' # Runs daily at midnight
jobs:
update-data-source-tas-and-install-yml-apps:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: 'develop'
token: ${{ secrets.DATA_SOURCES_DEPENDABOT }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
architecture: 'x64' # or the version your script requires
- name: Install Python Dependencies and ContentCTL and Atomic Red Team
run: |
echo "- Contentctl version - $(cat requirements.txt)"
pip install -r requirements.txt
- name: Update data source TAs and install.yml apps
run: |
echo "Updating data source supported_TA and repo install.yml app versions"
contentctl-ng update-data-source-tas --content-dirs .
# TODO: This comment is intentionally left in this workflow to demonstrate how individuals
# TAs can be intentionally excluded from updates, for example when we have intentionally pinned
# to an older version of a TA. In the future, we will try to make this a formally documented
# feature of contentctl-ng, but needing to do this is fairly rare and with out other priorities,
# does not fit at this time.
# The demonstration below shows how to exlcude the windows TA from updates, if necessary.
# git checkout -- $(grep -rl "https://splunkbase.splunk.com/app/742" data_sources/)
echo "Changed data source and install.yml files:"
git status --short -- data_sources install.yml
- name: Create data source TA and install.yml app update pull request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.DATA_SOURCES_DEPENDABOT }}
commit-message: Update data source TA and install.yml app versions
branch: auto-ta-update-${{ github.run_number }}
base: develop
title: Automated Data Source TA and install.yml App Update ${{ github.run_number }}
body: |
This PR contains data source supported_TA and install.yml app version updates generated by contentctl-ng.
The workflow runs:
```bash
contentctl-ng update-data-source-tas --content-dirs .
```
add-paths: |
data_sources/**
install.yml