Skip to content

Commit

Permalink
move generate changelogs/iso to image level
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles committed Nov 3, 2024
1 parent b9ef605 commit aaafdde
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 24 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build-image-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ on:
paths-ignore:
- "**.md"
schedule:
- cron: "40 4 * * *" # 4:40 UTC everyday
- cron: "40 4 * * 1,2,3,4,5,6" # 4:40 UTC All But Sunday
- cron: "40 4 * * 0" # 4:40 UTC Sunday
workflow_call:
workflow_dispatch:
inputs:
Expand All @@ -38,3 +39,12 @@ jobs:
with:
brand_name: ${{ matrix.brand_name }}
fedora_version: beta

generate-release:
name: Generate Release
needs: [build-image-beta]
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.scheduled == '40 4 * * 0'
secrets: inherit
uses: ./.github/workflows/generate-release.yml
with:
fedora_version: beta
16 changes: 16 additions & 0 deletions .github/workflows/build-image-gts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ jobs:
with:
brand_name: ${{ matrix.brand_name }}
fedora_version: gts

generate_release:
name: Generate Release
needs: [build-image-gts]
if: github.event_name == 'scheduled' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
secrets: inherit
uses: ./.github/workflows/generate-release.yml
with:
fedora_version: gts

build-iso-gts:
name: Build Stable ISOs
needs: [build-image-gts]
if: github.event_name == 'scheduled'
secrets: inherit
uses: ./.github/workflows/build-iso-stable.yml
19 changes: 18 additions & 1 deletion .github/workflows/build-image-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ on:
paths-ignore:
- "**.md"
schedule:
- cron: "40 4 * * *" # 4:40 UTC everyday
- cron: "40 4 * * 1,2,3,4,5,6" # 4:40 UTC All But Sunday
- cron: "40 4 * * 0" # 4:40 UTC Sunday
workflow_call:
workflow_dispatch:
inputs:
Expand All @@ -39,3 +40,19 @@ jobs:
image_flavors: '["main", "nvidia", "hwe", "hwe-nvidia"]'
brand_name: ${{ matrix.brand_name }}
fedora_version: latest

generate-release:
name: Generate Release
needs: [build-image-latest]
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.scheduled == '40 4 * * 0'
secrets: inherit
uses: ./.github/workflows/generate-release.yml
with:
fedora_version: latest

build-iso-latest:
name: Build Stable ISOs
needs: [build-image-latest]
if: github.event_name.scheduled == '40 4 * * 0'
secrets: inherit
uses: ./.github/workflows/build-iso-latest.yml
19 changes: 18 additions & 1 deletion .github/workflows/build-image-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
paths-ignore:
- "**.md"
schedule:
- cron: "45 5 * * *" # 5:41 UTC everyday
- cron: "45 5 * * 1,2,3,4,5,6" # 5:41 UTC everyday
- cron: "45 5 * * 0" # 5:41 UTC sunday
workflow_call:
workflow_dispatch:
inputs:
Expand All @@ -32,3 +33,19 @@ jobs:
with:
brand_name: ${{ matrix.brand_name }}
fedora_version: stable

generate-release:
name: Generate Release
needs: [build-image-stable]
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.scheduled == '45 5 * * 0'
secrets: inherit
uses: ./.github/workflows/generate-release.yml
with:
fedora_version: stable

build-iso-stable:
name: Build Stable ISOs
needs: [build-image-stable]
if: github.event_name.scheduled == '45 5 * * 0'
secrets: inherit
uses: ./.github/workflows/build-iso-stable.yml
2 changes: 0 additions & 2 deletions .github/workflows/build-iso-gts.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: GTS ISO
on:
# schedule:
# - cron: '0 2 * * sun' # 02:00 Sunday
workflow_dispatch:
workflow_call:

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-iso-latest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Latest ISO
on:
# schedule:
# - cron: '0 4 * * sun' # 04:00 Sunday
workflow_call:
workflow_dispatch:
inputs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-iso-stable.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Stable ISO
on:
# schedule:
# - cron: '41 6 * * 2' # 6:41 UTC every Tuesday
workflow_call:
workflow_dispatch:
inputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on:
workflow_call:
inputs:
make_latest:
description: "Make latest for Release"
type: boolean
default: false
fedora_version:
description: "Release Tag (e.g. gts, stable)"
type: string
Expand All @@ -12,18 +16,21 @@ on:
make_latest:
description: "Make latest for Release"
type: choice
default: "false"
default: 'false'
options:
- "false"
- "true"
- 'false'
- 'true'
fedora_version:
description: "Release Tag (e.g. gts, stable)"
required: true
type: choice
options:
- '["gts"]'
- '["stable"]'
- '["latest"]'
- '["beta"]'
- '["gts", "stable"]'
- '["gts", "stable", "latest", "beta"]'

permissions:
contents: write
Expand Down Expand Up @@ -64,5 +71,5 @@ jobs:
name: ${{ steps.generate-release-text.outputs.title }}
tag_name: ${{ steps.generate-release-text.outputs.tag }}
body_path: ./changelog.md
make_latest: ${{ inputs.make_latest == 'true' && matrix.version == 'stable' || false }}
prerelease: ${{ inputs.make_latest != 'false' }}
make_latest: ${{ inputs.make_latest == true && matrix.version == 'stable' || false }}
prerelease: ${{ inputs.make_latest != false }}
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build-iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-iso
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.brand_name}}-${{ inputs.fedora_version }}-iso
cancel-in-progress: true

jobs:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
description: "The full kernel version to pin"
type: string
outputs:
stable_release:
description: "If a release should be made for stable images"
value: ${{ jobs.build_container.outputs.stable_release }}
images:
description: "An array of images built and pushed to the registry"
value: ${{ jobs.check.outputs.images }}
Expand Down Expand Up @@ -480,12 +483,3 @@ jobs:
exit 1
fi
done
generate_release:
name: Generate Release
needs: [build_container, check]
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'scheduled') && (inputs.fedora_version == 'gts' || inputs.fedora_version == 'stable' && needs.build_container.outputs.stable_release == 'true')
secrets: inherit
uses: ./.github/workflows/generate_release.yml
with:
fedora_version: ${{ inputs.fedora_version }}

0 comments on commit aaafdde

Please sign in to comment.