Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Create stable.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ReChargedDeveloper authored May 18, 2024
1 parent 91282a2 commit 884c37d
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: System image build - stable

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

on:
push:
branches:
- 'stable-**'
workflow_dispatch:

jobs:
build-docker-image:
name: Build and publish docker container
uses: ./.github/workflows/build-builder.yml

list-pkgbuilds:
name: List Packages
runs-on: ubuntu-latest
outputs:
aur-pkgs: ${{ steps.set-aur-pkgs.outputs.matrix }}
pkgs: ${{ steps.set-pkgs.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- id: set-aur-pkgs
run: echo "matrix=$(ls -d aur-pkgs/*/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
shell: bash
- id: set-pkgs
run: echo "matrix=$(ls -d pkgs/*/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
shell: bash

aur-pkgbuild:
needs:
- build-docker-image
- list-pkgbuilds
name: Build AUR package
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package: ${{ fromJson(needs.list-pkgbuilds.outputs.aur-pkgs) }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build packages
run: |
docker pull ${{ steps.meta.outputs.tags }}
docker run --rm -v $(pwd):/workdir --entrypoint=/workdir/aur-pkgs/build-package.sh ${{ steps.meta.outputs.tags }} ${{ matrix.package }}
- name: Upload Package Archives
uses: actions/upload-artifact@v3
with:
name: AUR-packages
path: aur-pkgs/*.pkg.tar*

pkgbuild:
needs:
- build-docker-image
- list-pkgbuilds
name: Build package
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package: ${{ fromJson(needs.list-pkgbuilds.outputs.pkgs) }}
steps:
- uses: actions/checkout@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build packages
run: |
docker pull ${{ steps.meta.outputs.tags }}
docker run --rm -v $(pwd):/workdir --entrypoint=/workdir/pkgs/build-package.sh ${{ steps.meta.outputs.tags }} ${{ matrix.package }}
- name: Upload Package Archives
uses: actions/upload-artifact@v3
with:
name: Packages
path: pkgs/*.pkg.tar*

build:
needs:
- build-docker-image
- aur-pkgbuild
- pkgbuild
name: Build ChimeraOS STABLE image
uses: ./.github/workflows/build-system-image.yml

0 comments on commit 884c37d

Please sign in to comment.