diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000000..d1c3af6382 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,28 @@ +name: Daily sync of Photon Advisories + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + +permissions: + contents: write + +jobs: + scheduled: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Run sync + run: wget -r -l inf --no-parent --reject "index.html*" --no-host-directories --cut-dirs=3 -P advisories https://packages.broadcom.com/photon/photon_cve_metadata/cve/ + + - name: Commit and push if it changed + run: |- + git config user.name "AboutCode Automation" + git config user.email "automation@aboutcode.org" + git add -A + git commit -m "$(echo -e "Sync Photon Advisories\n\nSigned-off-by: AboutCode Automation ")" || exit 0 + git push