feat: use Fedora kernel from ublue-os/bluefin for LTS-HWE builds #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build ISO | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| build_combinations: | |
| description: 'JSON array of builds. Ex: [{"image_suffix":"","tag_suffix":"-hwe"}]' | |
| required: true | |
| default: '[{"image_suffix":"","tag_suffix":""},{"image_suffix":"","tag_suffix":"-hwe"},{"image_suffix":"-gdx","tag_suffix":""}]' | |
| type: string | |
| upload-to-cloudflare: | |
| description: "Upload to Cloudflare" | |
| required: false | |
| default: false | |
| type: boolean | |
| env: | |
| IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" | |
| IMAGE_NAME: "bluefin" | |
| DEFAULT_TAG: "lts" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| determine-matrix: | |
| name: Determine Build Matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Set Build Matrix | |
| id: set-matrix | |
| run: | | |
| # For pull requests (or any non-manual trigger), use the hardcoded default. | |
| if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then | |
| echo 'matrix={"include":[{"image_suffix":"","tag_suffix":""},{"image_suffix":"","tag_suffix":"-hwe"},{"image_suffix":"-gdx","tag_suffix":"-hwe"}]}' >> $GITHUB_OUTPUT | |
| # For manual runs, use the JSON provided in the workflow_dispatch input. | |
| else | |
| JSON_INPUT='${{ inputs.build_combinations }}' | |
| echo "matrix={\"include\":$JSON_INPUT}" >> $GITHUB_OUTPUT | |
| fi | |
| build: | |
| needs: determine-matrix | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.determine-matrix.outputs.matrix) }} | |
| name: Build ISO for bluefin${{ matrix.image_suffix }}:lts${{ matrix.tag_suffix }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Define Build Variables | |
| id: vars | |
| run: | | |
| echo "FULL_IMAGE_NAME=${{ env.IMAGE_NAME }}${{ matrix.image_suffix }}" >> $GITHUB_ENV | |
| echo "FULL_TAG_NAME=${{ env.DEFAULT_TAG }}${{ matrix.tag_suffix }}" >> $GITHUB_ENV | |
| echo "ARTIFACT_NAME=${{ env.IMAGE_NAME }}${{ matrix.image_suffix }}-${{ env.DEFAULT_TAG }}${{ matrix.tag_suffix }}-iso" >> $GITHUB_ENV | |
| - name: Build ISO | |
| id: build-iso | |
| uses: osbuild/bootc-image-builder-action@019bb59c5100ecec4e78c9e94e18a840110f7a0b # v0.0.2 | |
| with: | |
| config-file: ./iso.toml | |
| image: ${{ env.IMAGE_REGISTRY }}/${{ env.FULL_IMAGE_NAME }}:${{ env.FULL_TAG_NAME }} | |
| types: | | |
| iso | |
| - name: Upload to Job Artifacts | |
| if: github.event.inputs.upload-to-cloudflare == 'false' || github.event_name != 'workflow_dispatch' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }} | |
| if-no-files-found: error | |
| path: ${{ steps.build-iso.outputs.output-directory }} | |
| - name: Upload to CloudFlare | |
| if: github.event.inputs.upload-to-cloudflare == 'true' | |
| 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-iso.outputs.output-directory }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y rclone | |
| rclone copy "$SOURCE_DIR" "R2:bluefin/${{ env.ARTIFACT_NAME }}" |