-
Notifications
You must be signed in to change notification settings - Fork 50
35 lines (34 loc) · 1.31 KB
/
update-metadata-glsa.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Keep GLSA metadata updated
on:
schedule:
- cron: '0 7 1 * *'
workflow_dispatch:
jobs:
keep-glsa-metadata-updated:
runs-on: ubuntu-latest
steps:
- name: Check out scripts
uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_PR_TOKEN }}
- name: Update GLSA metadata
id: update-glsa-metadata
run: |
glsa_dir='sdk_container/src/third_party/portage-stable/metadata/glsa'
rm -rf "${glsa_dir}"
mkdir --parents "${glsa_dir}"
rsync --archive rsync://rsync.gentoo.org/gentoo-portage/metadata/glsa/* "${glsa_dir}"
todaydate=$(date +%Y-%m-%d)
echo "TODAYDATE=${todaydate}" >>"${GITHUB_OUTPUT}"
- name: Create pull request for main branch
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.BOT_PR_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
commit-message: "portage-stable/metadata: Monthly GLSA metadata updates"
author: Flatcar Buildbot <buildbot@flatcar-linux.org>
labels: main