Skip to content

Commit 845abf3

Browse files
committed
Add iso publishing to the release workflow
1 parent ab090ab commit 845abf3

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: release-packages-and-images
33
# - RPM packages
44
# - DEB packages
55
# - Bootc container images
6-
6+
# - ISO images
77
on:
88
workflow_dispatch:
99
inputs:
@@ -15,14 +15,6 @@ on:
1515
default: "latest"
1616
description: OKD version tag from https://quay.io/repository/okd/scos-release?tab=tags
1717
type: string
18-
build:
19-
type: choice
20-
description: Types of artifacts to build
21-
default: all
22-
options:
23-
- all
24-
- packages
25-
- bootc-image
2618

2719
jobs:
2820
build-microshift:
@@ -50,21 +42,19 @@ jobs:
5042
okd-version-tag: ${{ inputs.okd-version-tag != 'latest' && inputs.okd-version-tag || steps.detect-okd-version.outputs.okd-version-tag }}
5143
bootc-image-url: quay.io/centos-bootc/centos-bootc
5244
bootc-image-tag: stream10
53-
build: ${{ inputs.build }}
45+
build: all
5446

5547
# Test the local container image with the quick start and clean procedures
5648
# before releasing the artifacts. Make sure not to run the clean scripts
5749
# because the images are needed for the release process.
5850
- name: Run the quick start script and clean scripts
59-
if: contains(fromJSON('["all", "bootc-image"]'), inputs.build)
6051
uses: ./.github/actions/quick-start-clean
6152
with:
6253
image-ref: localhost/microshift-okd:latest
6354
run-clean: false
6455

6556
# Prepare the RPM archives to be released before converting to DEB packages.
6657
- name: Prepare the RPM archives
67-
if: contains(fromJSON('["all", "packages"]'), inputs.build)
6858
shell: bash
6959
run : |
7060
# Archive sources separately from the RPMs
@@ -95,39 +85,44 @@ jobs:
9585
# This step is run after the RPM archives are prepared to avoid
9686
# including DEB packages in the RPM archive.
9787
- name: Convert the RPMs to DEB packages
98-
if: contains(fromJSON('["all", "packages"]'), inputs.build)
9988
uses: ./.github/actions/build-deb
10089
with:
10190
ushift-gitref: ${{ inputs.ushift-gitref }}
10291
okd-version-tag: ${{ inputs.okd-version-tag != 'latest' && inputs.okd-version-tag || steps.detect-okd-version.outputs.okd-version-tag }}
10392
build-rpms: false
10493

10594
- name: Prepare the DEB archives
106-
if: contains(fromJSON('["all", "packages"]'), inputs.build)
10795
shell: bash
10896
run: |
10997
cd /mnt/rpms/deb
11098
sudo tar zcvf /mnt/release/microshift-debs-$(uname -m).tgz .
11199
112-
- name: Release RPM and DEB packages
113-
if: contains(fromJSON('["all", "packages"]'), inputs.build)
100+
- name: Prepare the ISO image
101+
shell: bash
102+
run: |
103+
version="${{ steps.version.outputs.version }}"
104+
arch="$(uname -m)"
105+
106+
cd /mnt/iso
107+
mv bootiso/install.iso "/mnt/release/microshift-${version}-${arch}.iso"
108+
109+
- name: Release RPM / DEB packages and ISO image
114110
uses: softprops/action-gh-release@v2
115111
with:
116112
tag_name: ${{ steps.version.outputs.version }}
117113
files: |
118114
/mnt/release/microshift-rpms-*.tgz
119115
/mnt/release/microshift-debs-*.tgz
120116
/mnt/release/microshift-src.tgz
117+
/mnt/release/microshift-*.iso
121118
overwrite_files: true
122119

123120
- name: Login to GitHub Container Registry
124-
if: contains(fromJSON('["all", "bootc-image"]'), inputs.build)
125121
uses: ./.github/actions/podman-login
126122
with:
127123
token: ${{ secrets.GITHUB_TOKEN }}
128124

129125
- name: Publish Bootc container image for the target architecture
130-
if: contains(fromJSON('["all", "bootc-image"]'), inputs.build)
131126
shell: bash
132127
run: |
133128
set -euo pipefail
@@ -157,13 +152,11 @@ jobs:
157152
echo "version=$(cat /tmp/version.txt)" >> "${GITHUB_OUTPUT}"
158153
159154
- name: Login to GitHub Container Registry
160-
if: contains(fromJSON('["all", "bootc-image"]'), inputs.build)
161155
uses: ./.github/actions/podman-login
162156
with:
163157
token: ${{ secrets.GITHUB_TOKEN }}
164158

165159
- name: Publish Bootc container image manifest
166-
if: contains(fromJSON('["all", "bootc-image"]'), inputs.build)
167160
shell: bash
168161
run: |
169162
set -euo pipefail
@@ -183,7 +176,6 @@ jobs:
183176
envsubst < .github/workflows/release.md > /tmp/release.md
184177
185178
- name: Add release note for bootc image usage
186-
if: contains(fromJSON('["all", "bootc-image"]'), inputs.build)
187179
uses: softprops/action-gh-release@v2
188180
with:
189181
tag_name: ${{ steps.version.outputs.version }}

0 commit comments

Comments
 (0)