Add github actions for testing

This commit is contained in:
Gerald Pinder
2023-12-30 10:10:57 -05:00
parent 1ac21dfd32
commit 2183491feb
6 changed files with 144 additions and 0 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @castrojo

13
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

2
.github/semantic.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
enabled: true
titleOnly: true

77
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
# This workflow builds every branch of the repository daily at 16:30 UTC, one hour after ublue-os/nvidia builds.
# The images are also built after pushing changes or pull requests.
# The builds can also be triggered manually in the Actions tab thanks to workflow dispatch.
# Only the branch called `live` is published.
name: build-ublue
on: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
schedule:
- cron: "30 16 * * *"
push:
branches:
- live
- template
- main
paths-ignore: # don't rebuild if only documentation has changed
- "**.md"
pull_request:
workflow_dispatch:
# Only deploys the branch named "live". Ignores all other branches, to allow
# having "development" branches without interfering with GHCR image uploads.
jobs:
ublue-build:
name: Template Containerfile
runs-on: ubuntu-22.04
permissions:
contents: read
strategy:
fail-fast: false
matrix:
# !!!
# Add recipes for all the images you want to build here.
# Don't add module configuration files, you will get errors.
recipe:
- recipe-jp-desktop.yml
- recipe-jp-laptop.yml
- recipe-cp-laptop.yml
# !!!
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v1
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- uses: actions/checkout@v2
- uses: sigstore/cosign-installer@v3.3.0
- name: Install Cargo
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Ublue CLI tool
run: |
cargo install --git https://gitlab.com/wunker-bunker/ublue-cli --branch github-support --locked
- name: Install Dependencies
run: |
sudo apt-get install -y buildah skopeo
- name: Build Image
env:
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
PR_EVENT_NUMBER: ${{ github.event.number }}
REGISTRY_TOKEN: ${{ github.token }}
run: |
ublue build --push -vv ./config/${{ matrix.recipe }}
- name: Echo outputs
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/live'
run: |
echo "${{ toJSON(steps.push.outputs) }}"

47
.github/workflows/release-iso.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
on:
push:
paths:
- 'boot_menu.yml'
- '.github/workflows/release-iso.yml'
workflow_dispatch:
name: release-iso
jobs:
release-iso:
name: Generate and Release ISOs
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: fedora:39
options: --privileged
steps:
- uses: actions/checkout@v4
- name: Generate ISO
uses: ublue-os/isogenerator@v2.2.0
id: isogenerator
with:
image-name: ${{ github.event.repository.name }}
installer-repo: releases
installer-major-version: 39
boot-menu-path: boot_menu.yml
- name: install github CLI
run: |
sudo dnf install 'dnf-command(config-manager)' -y
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh -y
- name: Upload ISO
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
if gh release list -R ${{ github.repository_owner }}/${{ github.event.repository.name }} | grep "auto-iso"; then
gh release view auto-iso -R ${{ github.repository_owner }}/${{ github.event.repository.name }} --json assets -q .assets[].name | xargs --no-run-if-empty -L 1 gh release delete-asset auto-iso -R ${{ github.repository_owner }}/${{ github.event.repository.name }}
gh release upload auto-iso ${{ steps.isogenerator.outputs.iso-path }} -R ${{ github.repository_owner }}/${{ github.event.repository.name }} --clobber
else
gh release create auto-iso ${{ steps.isogenerator.outputs.iso-path }} -t ISO -n "This is an automatically generated ISO release." -R ${{ github.repository_owner }}/${{ github.event.repository.name }}
fi
- name: Upload SHA256SUM
env:
GITHUB_TOKEN: ${{ github.token }}
run:
gh release upload auto-iso ${{ steps.isogenerator.outputs.sha256sum-path }} -R ${{ github.repository_owner }}/${{ github.event.repository.name }} --clobber

4
cosign.pub Normal file
View File

@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYiEL+YiOcevJqnNY/Z+r3EQ1a1Lg
SMf9uQ8jXK7oQtAMaRD0OU06tu+Xd/ll8c4h1ZtMg2lERDf2XPjBawHT6g==
-----END PUBLIC KEY-----