Skip to content

Commit

Permalink
Merge pull request #2 from regolith-linux/generate-distros
Browse files Browse the repository at this point in the history
feat: generate distro folders out of voulage stages
  • Loading branch information
khos2ow authored Jan 7, 2025
2 parents 2cde408 + 470a0fa commit 1e04ef5
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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: [email protected]
commit_author: "regolith-bot <[email protected]>"
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit 1e04ef5

Please sign in to comment.