mirror of
https://github.com/fkie-cad/nvd-json-data-feeds.git
synced 2025-06-19 17:31:42 +00:00
Add monitoring workflows (#7)
This commit is contained in:
parent
0fb201f994
commit
f8a794a730
2
.github/workflows/monitor_release.yml
vendored
2
.github/workflows/monitor_release.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
name: monitor-release
|
name: monitor-release
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 16 * * *"
|
- cron: "0 4 * * *"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
monitor-release:
|
monitor-release:
|
||||||
|
26
.github/workflows/monitor_sync.yml
vendored
Normal file
26
.github/workflows/monitor_sync.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: monitor-sync
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 22 * * *"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
jobs:
|
||||||
|
monitor-sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |
|
||||||
|
git fetch --prune --unshallow --tags
|
||||||
|
latest_commit=$(git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y.%m.%d")
|
||||||
|
cur=$(date +"%Y.%m.%d")
|
||||||
|
|
||||||
|
if [ "$latest_commit" != "$cur" ]; then
|
||||||
|
>&2 echo "Warning: No repository sync for one or more days"
|
||||||
|
exit 101
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
REPOSITORY: ${{ github.repository }}
|
||||||
|
BRANCH_NAME: ${{ github.ref_name }}
|
Loading…
x
Reference in New Issue
Block a user