-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (52 loc) · 1.53 KB
/
generate.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Generate Distro Folders
on:
schedule:
- cron: "0 2 1 * *"
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
- main
jobs:
matrix-builder:
runs-on: ubuntu-24.04
outputs:
includes: ${{ steps.builder.outputs.includes }}
steps:
- name: Build Matrix
id: builder
uses: regolith-linux/actions/build-matrix@main
with:
type: "platform"
stage: "unstable"
arch: "amd64"
generate:
runs-on: ubuntu-24.04
needs: matrix-builder
env:
DISTRO_INCLUDES: "${{ needs.matrix-builder.outputs.includes }}"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Check Distros
run: |
while read item; do
distro=$(echo "$item" | jq -r .distro)
codename=$(echo "$item" | jq -r .codename)
echo "${distro}/${codename}"
mkdir -p "${distro}/${codename}"
touch "${distro}/${codename}/additional-packages"
done < <(echo "$DISTRO_INCLUDES" | jq -c '.[]')
- name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN }}
with:
file_pattern: "."
commit_message: "Auto generate distro and codename folders"
commit_user_name: regolith-bot
commit_user_email: bot@regolith-desktop.com
commit_author: "regolith-bot <bot@regolith-desktop.com>"