Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor ISO build workflow to use isogenerator outputs #982

Merged
merged 8 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ on:
- testing
paths-ignore:
- '**.md'
- '.github/workflows/build_iso.yml'
push:
branches:
- main
- testing
paths-ignore:
- '**.md'
- '.github/workflows/build_iso.yml'
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
Expand Down
45 changes: 32 additions & 13 deletions .github/workflows/build_iso.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Build Bluefin ISOs
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- '.github/workflows/build_iso.yml'

env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

Expand All @@ -25,16 +31,16 @@ jobs:
matrix:
image_name: [bluefin, bluefin-asus, bluefin-nvidia, bluefin-surface, bluefin-dx, bluefin-dx-nvidia, bluefin-dx-asus, bluefin-dx-surface]
major_version: [38, 39]
image_tag: [latest,gts]
image_tag: [latest, gts]
exclude:
- major_version: 38
image_tag: latest
- major_version: 39
image_tag: gts
steps:
- name: Build ISOs
#if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
uses: ublue-os/[email protected]
uses: ublue-os/[email protected]
id: build
with:
ARCH: x86_64
IMAGE_NAME: ${{ matrix.image_name }}
Expand All @@ -44,16 +50,29 @@ jobs:
IMAGE_TAG: ${{ matrix.image_tag }}
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
ENROLLMENT_PASSWORD: 'ublue-os'
ACTION_REPO: ublue-os/isogenerator
ACTION_REF: 1.0.8
- name: Upload ISOs and SHA Checksum Files to R2

- name: Upload ISOs and Checksum to Job Artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.image_name }}-${{ matrix.image_tag }}-${{ matrix.major_version}}
path: ${{ steps.build.outputs.output-directory }}
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true

- name: Upload ISOs and Checksum to R2
if: github.event_name == 'workflow_dispatch'
shell: bash
env:
RCLONE_CONFIG_R2_TYPE: s3
RCLONE_CONFIG_R2_PROVIDER: Cloudflare
RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
RCLONE_CONFIG_R2_REGION: auto
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
SOURCE_DIR: ${{ steps.build.outputs.output-directory }}
run: |
export RCLONE_CONFIG_R2_TYPE=s3
export RCLONE_CONFIG_R2_PROVIDER=Cloudflare
export RCLONE_CONFIG_R2_ACCESS_KEY_ID=${{ secrets.R2_ACCESS_KEY_ID }}
export RCLONE_CONFIG_R2_SECRET_ACCESS_KEY=${{ secrets.R2_SECRET_ACCESS_KEY }}
export RCLONE_CONFIG_R2_REGION=auto
export RCLONE_CONFIG_R2_ENDPOINT=${{ secrets.R2_ENDPOINT }}
dnf install -y rclone
rclone copy ./end_iso R2:bluefin
rclone copy $SOURCE_DIR R2:bluefin
Loading