Skip to content
Merged
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
15 changes: 11 additions & 4 deletions .github/workflows/reusable-build-iso-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ on:
- gts
- stable
- all
upload_artifacts:
description: 'Upload ISOs as job artifacts'
type: boolean
default: false
upload_r2:
description: 'Upload ISOs to Cloudflare R2'
type: boolean
default: true
pull_request:
paths:
- ".github/workflows/reusable-build-iso-anaconda.yml"
Expand All @@ -36,7 +44,7 @@ jobs:
matrix:
platform: [amd64]
flavor: ["main", "nvidia-open"]
image_version: ["gts", "stable"]
image_version: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.image_version == 'all' && fromJSON('["gts", "stable", "lts"]') || fromJSON(format('["{0}"]', github.event.inputs.image_version))) || fromJSON('["gts", "stable"]') }}
include:
- platform: amd64
flavor: "main"
Expand Down Expand Up @@ -111,7 +119,6 @@ jobs:
hook-post-rootfs: ${{ matrix.image_version == 'lts' && format('{0}/iso_files/configure_lts_iso_anaconda.sh', github.workspace) || format('{0}/iso_files/configure_iso_anaconda.sh', github.workspace) }}
kargs: ${{ steps.image_ref.outputs.kargs }}
builder-distro: ${{ matrix.image_version == 'lts' && 'centos' || 'fedora' }}


- name: Rename ISO
id: rename
Expand All @@ -129,15 +136,15 @@ jobs:
echo "output_directory=$OUTPUT_DIRECTORY" >> "${GITHUB_OUTPUT}"

- name: Upload to Job Artifacts
if: github.ref_name == 'testing'
if: github.ref_name == 'testing' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_artifacts)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ steps.image_ref.outputs.artifact_format }}
if-no-files-found: error
path: ${{ steps.rename.outputs.output_directory }}

- name: Upload to CloudFlare
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || github.event.inputs.upload_r2)

Copilot AI Aug 8, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition logic could be simplified. When github.event_name is 'workflow_dispatch', the first part of the AND condition is always true, making it redundant. Consider simplifying to: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || github.event.inputs.upload_r2 == 'true')

Copilot uses AI. Check for mistakes.
shell: bash
env:
RCLONE_CONFIG_R2_TYPE: s3
Expand Down
Loading