Update software-sources.json #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Software - Update version and security info" | |
on: | |
schedule: | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule | |
# * is a special character in YAML so you have to quote this string | |
- cron: '30 8 14,28 * *' | |
push: | |
paths: | |
- 'software-sources.json' | |
- '**update-software.yml' | |
- '**verify_result.py' | |
- 'update_software.py' | |
- 'SAMPLE-software-rules.json' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest] | |
config: ["software_github_adadvisory_database_path=advisory_database"] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
- name: Setup dependencies using pip | |
run: pip install -r requirements.txt | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Setup config (using SAMPLE-config.py as config.py) - LINUX | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python .github/workflows/verify_result.py -c ${{ matrix.config }},github_api_key=${{ secrets.GITHUB_TOKEN }} | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Setup config (using SAMPLE-config.py as config.py) - WINDOWS | |
run: python .github\workflows\verify_result.py -c ${{ matrix.config }},github_api_key=${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout advisory-database repo | |
uses: actions/checkout@v4 | |
with: | |
repository: github/advisory-database | |
ref: main | |
path: | |
advisory_database | |
sparse-checkout: | | |
advisories | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Verifing Software(s) - LINUX | |
run: python update_software.py | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Verifing Software(s) - WINDOWS | |
run: python update_software.py | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Git Fix sort order to Software sources(s) - WINDOWS | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
git add software-sources.json | |
git commit -m "Added changed software" | |
git push | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Git Add any changes to Software(s) - WINDOWS | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
git add software-full.json | |
git commit -m "Added changed software" | |
git push | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Git Add any changes to License(s) - WINDOWS | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
git add SAMPLE-software-rules.json | |
git commit -m "Added changed licenses" | |
git push |