Skip to content

Update Advisory

Update Advisory #59

name: Update Advisory
permissions:
contents: write
on:
push:
branches: [ main ]
paths-ignore:
- 'advisories/**'
- 'docs/**'
pull_request:
branches: [ main ]
paths-ignore:
- 'advisories/**'
- 'docs/**'
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run every day at midnight
jobs:
update-versions:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21'
- name: Checkout code
uses: actions/checkout@v3
- name: Run tests
run: go test ./src/... -v
continue-on-error: false
- name: Run Go application
run: |
go build -o update-advisory src/main.go
./update-advisory
rm update-advisory
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"2
git add ./advisories/V8-advisory.json
git add ./src/V8-cache.json
git commit -m "Update advisories/V8_advisory.json and src/V8-cache.json"
git push