78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
# 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) }}"
|