Skip to content

Commit

Permalink
use reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
asac committed Aug 13, 2024
1 parent 98892d3 commit f2da1cb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 32 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/buildkas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Build Kas'

on:
workflow_call:
inputs:
config:
required: true
type: string

jobs:
build-kas:
runs-on: ["self-hosted"]
container:
image: ghcr.io/pantacor/kas/kas:next-v2
volumes:
- shared:/shared
options: --user root
steps:
- name: chown
run: chown -R builder:builder $RUNNER_WORKSPACE
- name: chowna
run: chown -R builder:builder /__w
- name: shared
run: mkdir -p /shared/sstate && chown builder:builder /shared/sstate && mkdir -p /shared/dldir && chown builder:builder /shared/dldir
- name: getgit
run: su - builder -c "cd $GITHUB_WORKSPACE && git fetch origin $GITHUB_SHA && git reset --hard $GITHUB_SHA && rm -rf build/ && git clean -f -f -d -x "
- name: Build Kas
run: su - builder -c "cd $GITHUB_WORKSPACE && env && kas build .github/configs/${{ inputs.config }}:.github/configs/shared-vols.yaml"
- name: chmod
run: chmod -R 777 $GITHUB_WORKSPACE
- name: Archive image artifacts
uses: actions/upload-artifact@v4
with:
name: pantavisor-remix-images
path: |
build/tmp-*/deploy/images/*/pantavisor-remix*.wic.*
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: pvrexports
path: |
build/tmp-*/deploy/images/*/*pvrexport.*
40 changes: 8 additions & 32 deletions .github/workflows/onpush.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,12 @@ on:
push:

jobs:
build-remix-sunxi:
runs-on: ["self-hosted"]
container:
image: ghcr.io/pantacor/kas/kas:next-v2
volumes:
- shared:/shared
options: --user root
steps:
- name: chown
run: chown -R builder:builder $RUNNER_WORKSPACE
- name: chowna
run: chown -R builder:builder /__w
- name: shared
run: mkdir -p /shared/sstate && chown builder:builder /shared/sstate && mkdir -p /shared/dldir && chown builder:builder /shared/dldir
- name: getgit
run: su - builder -c "cd $GITHUB_WORKSPACE && git fetch origin $GITHUB_SHA && git reset --hard $GITHUB_SHA && rm -rf build/ && git clean -f -f -d -x "
- name: Build Kas
run: su - builder -c "cd $GITHUB_WORKSPACE && env && kas build .github/configs/sunxi/sunxi-orange-pi-3lts-remix-scarthgap.yaml:.github/configs/shared-vols.yaml"
- name: chmod
run: chmod -R 777 $GITHUB_WORKSPACE
- name: Archive image artifacts
uses: actions/upload-artifact@v4
with:
name: pantavisor-remix-images
path: |
build/tmp-*/deploy/images/*/pantavisor-remix*.wic.*
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: pvrexports
path: |
build/tmp-*/deploy/images/*/*pvrexport.*
build-remix-sunxi-orange-pi-3lts-remix-scarthgap:
uses: ./.github/workflows/buildkas.yaml
with:
config: sunxi/sunxi-orange-pi-3lts-remix-scarthgap.yaml
build-remix-sunxi-orange-pi-r1-remix-scarthgap:
uses: ./.github/workflows/buildkas.yaml
with:
config: sunxi/sunxi-orange-pi-r1-remix-scarthgap.yaml

0 comments on commit f2da1cb

Please sign in to comment.