Merge pull request #385 from flatcar/dongsu/github-actions-glsa-metadata

.github: add monthly workflow update-metadata-glsa
This commit is contained in:
Dongsu Park 2022-11-18 13:10:35 +01:00 committed by GitHub
commit a70ddb5b2b
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,32 @@
name: Keep GLSA metadata updated
on:
schedule:
- cron: '0 7 1 * *'
workflow_dispatch:
jobs:
keep-glsa-metadata-updated:
runs-on: ubuntu-latest
steps:
- name: Checkout portage-stable
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update GLSA metadata
id: update-glsa-metadata
run: |
rm -rf metadata/glsa
mkdir --parents metadata/glsa
rsync --archive rsync://rsync.gentoo.org/gentoo-portage/metadata/glsa/* ./metadata/glsa/
todaydate=$(date +%Y-%m-%d)
echo "TODAYDATE=${todaydate}" >>"${GITHUB_OUTPUT}"
- name: Create pull request for main branch
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: buildbot/monthly-glsa-metadata-updates-${{steps.update-glsa-metadata.outputs.TODAYDATE }}
delete-branch: true
base: main
title: Monthly GLSA metadata ${{steps.update-glsa-metadata.outputs.TODAYDATE }}
body: Updated GLSA metadata
labels: main

View File

@ -20,13 +20,14 @@ jobs:
path: gentoo path: gentoo
# Gentoo is quite a large repo, so limit ourselves to last # Gentoo is quite a large repo, so limit ourselves to last
# quarter milion of commits. It is about two years worth of changes. # quarter milion of commits. It is about two years worth of changes.
# Is is needed by the sync script to find out the hash of the last commit
# that made the changes to the package.
fetch-depth: 250000 fetch-depth: 250000
ref: master ref: master
- name: Checkout build scripts - name: Checkout build scripts
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: flatcar/flatcar-build-scripts repository: flatcar/flatcar-build-scripts
ref: krnowak/stuff
path: flatcar-build-scripts path: flatcar-build-scripts
- name: Update listed packages - name: Update listed packages
id: update-listed-packages id: update-listed-packages