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(ci): Consolidate workflow into just commands #1910

Merged
merged 110 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
c6ae372
refactor: Reorganize Build Process
m2Giles Nov 1, 2024
ad9b9cb
Merge branch 'main' into refactor-build
m2Giles Nov 1, 2024
258d1cb
fix: use raw-img for rechunk
m2Giles Nov 1, 2024
081dbba
chore(ci): compat with old names
m2Giles Nov 1, 2024
637f641
try matrix in workflow call
m2Giles Nov 1, 2024
a06e9a1
Revert "try matrix in workflow call"
m2Giles Nov 1, 2024
5a6dcff
try matrix changes again
m2Giles Nov 1, 2024
f3ccdf7
Revert "try matrix changes again"
m2Giles Nov 1, 2024
18fc0b0
use inputs!
m2Giles Nov 1, 2024
3c3daf1
Revert "use inputs!"
m2Giles Nov 1, 2024
d50912b
another matrix try
m2Giles Nov 1, 2024
b4ae212
use include instead of exclude
m2Giles Nov 1, 2024
927f8e9
JSON String for matrix
m2Giles Nov 2, 2024
cfaa180
swap quotes
m2Giles Nov 2, 2024
3e521b0
fromJSON?
m2Giles Nov 2, 2024
53d3719
remove quotes
m2Giles Nov 2, 2024
d4522ad
another try?
m2Giles Nov 2, 2024
01a24e1
Single Line
m2Giles Nov 2, 2024
eeb845d
add selectable build choice
m2Giles Nov 2, 2024
b05c715
push old hwe image names
m2Giles Nov 2, 2024
757df34
handle defaults
m2Giles Nov 2, 2024
0f69dc5
fix expression
m2Giles Nov 2, 2024
5ba2948
Update build-image-latest.yml
m2Giles Nov 2, 2024
0f84169
Update reusable-build.yml
m2Giles Nov 2, 2024
8c7362e
Update build-image-latest.yml
m2Giles Nov 2, 2024
4251ec2
match for ISOs, loop tags
m2Giles Nov 2, 2024
72a598e
add another build-fix
m2Giles Nov 2, 2024
52c2732
fix check for build-fix
m2Giles Nov 2, 2024
9e14a3b
ZFS verify based on akmods flavor
m2Giles Nov 2, 2024
cf2fe9c
don't fail fast
m2Giles Nov 2, 2024
8b591da
fix hwe tagging
m2Giles Nov 2, 2024
dfb1020
start getting changelogs in place
m2Giles Nov 2, 2024
a7d551f
wire up changelogs
m2Giles Nov 2, 2024
3d016e6
wireup changelogs
m2Giles Nov 3, 2024
f4b7ff3
enable kernel pinning per workflow call
m2Giles Nov 3, 2024
16d7d2c
fix typo
m2Giles Nov 3, 2024
8242cc4
missing empty string?
m2Giles Nov 3, 2024
77956a8
test, disable changelogs
m2Giles Nov 3, 2024
3ac3cd2
Merge branch 'main' into refactor-build
m2Giles Nov 3, 2024
0537b5b
turn back on changelogs
m2Giles Nov 3, 2024
11c0b6c
fix typos
m2Giles Nov 3, 2024
1ff55ab
fix workflow
m2Giles Nov 3, 2024
118da95
fix codacy warnings
m2Giles Nov 3, 2024
b9ef605
fix codacy error
m2Giles Nov 3, 2024
aaafdde
move generate changelogs/iso to image level
m2Giles Nov 3, 2024
155e4bc
handle workflow call for stable
m2Giles Nov 3, 2024
3bd697a
fix broken symlinks
m2Giles Nov 3, 2024
951662d
use json string
m2Giles Nov 3, 2024
67b7e7e
add changelogs just command
m2Giles Nov 3, 2024
d79d32c
ran `pre-commit` for build related files
bsherman Nov 3, 2024
127af15
remove unused just recipe and vscode tasks
bsherman Nov 3, 2024
c9fb060
rename inputs/matrix "fedora_version" to "stream_name"
bsherman Nov 3, 2024
b4028f2
update gitignore for changelogs
m2Giles Nov 5, 2024
639c655
number all base build scripts
bsherman Nov 5, 2024
a81ad34
feat: Justfile improvements
m2Giles Nov 5, 2024
65ed8ba
Merge branch 'refactor-build' into justfile-workflow
m2Giles Nov 5, 2024
9e703ec
Merge branch 'main' into justfile-workflow
m2Giles Nov 5, 2024
7ba8c27
more changes to justfile
m2Giles Nov 5, 2024
eeb95ad
add groups
m2Giles Nov 7, 2024
2a4d1cf
Merge branch 'main' into justfile-workflow
m2Giles Nov 7, 2024
f12b0cc
workflow-conversion to justfile
m2Giles Nov 8, 2024
3ccf45e
Merge branch 'main' into justfile-workflow
m2Giles Nov 8, 2024
81caaa1
Update .github/workflows/reusable-build.yml
castrojo Nov 8, 2024
6f8c499
install just in workflows
m2Giles Nov 8, 2024
0de45ac
cp just to path
m2Giles Nov 8, 2024
4c25616
don't sudo check pipeline
m2Giles Nov 8, 2024
da0ef85
fix typos
m2Giles Nov 8, 2024
9cb5792
reorder workflow
m2Giles Nov 8, 2024
c8e0fe6
fix env Name
m2Giles Nov 8, 2024
5353069
reorganize
m2Giles Nov 8, 2024
d891218
use just from repo
m2Giles Nov 8, 2024
809de08
remove which
m2Giles Nov 8, 2024
85e870c
Merge branch 'main' into justfile-workflow
m2Giles Nov 8, 2024
d5adf28
use just from alpine
m2Giles Nov 8, 2024
2a93f0f
install from git release
m2Giles Nov 8, 2024
65c43f1
rename just install
m2Giles Nov 8, 2024
3f259d4
another try
m2Giles Nov 8, 2024
d40d8ed
missing EOL
m2Giles Nov 8, 2024
c3adfed
fix image, make version dynamic for just
m2Giles Nov 9, 2024
0b4747c
delete old image
m2Giles Nov 9, 2024
b2342dc
fixup ID for pipeline. Changelogs just.
m2Giles Nov 9, 2024
075c279
delete unchunked image before pull
m2Giles Nov 9, 2024
aa9d546
correct SHA_HEAD_SHORT
m2Giles Nov 9, 2024
1b9dfab
only install kernel-devel if it wasn't already pulled in.
m2Giles Nov 9, 2024
5be762b
don't install openrazor
m2Giles Nov 9, 2024
4e2d1b7
fix typos
m2Giles Nov 9, 2024
39602d6
add back xpadneo
m2Giles Nov 9, 2024
3313263
add back openrazer
m2Giles Nov 9, 2024
6555e2e
openrazer needs srpm
m2Giles Nov 9, 2024
850e971
work on tagging
m2Giles Nov 9, 2024
b043776
fix tagging
m2Giles Nov 9, 2024
1fe81f8
local tagging
m2Giles Nov 9, 2024
6533418
fix image name
m2Giles Nov 9, 2024
6d906b6
change verbosity
m2Giles Nov 9, 2024
1c8b389
fix typo
m2Giles Nov 9, 2024
cfb4045
more just in workflow
m2Giles Nov 10, 2024
6500a35
fix workflow
m2Giles Nov 10, 2024
c34c486
show outputs for tags
m2Giles Nov 10, 2024
c4b3990
fixup quotes
m2Giles Nov 10, 2024
7cc74a2
splitup pipeline
m2Giles Nov 10, 2024
68c9d16
update changelogs
m2Giles Nov 10, 2024
bd40d7c
fix rechunk
m2Giles Nov 10, 2024
2bf1251
reorder generate-release workflow
m2Giles Nov 10, 2024
370ef53
remove whitespace; fix schedule
m2Giles Nov 10, 2024
c290d78
remove testing tags, fix build-iso
m2Giles Nov 10, 2024
aefd91d
Merge branch 'main' into justfile-workflow
m2Giles Nov 10, 2024
abd44d6
Merge branch 'main' into justfile-workflow
m2Giles Nov 10, 2024
7a51e0e
remove old image earlier in rechunk, permissions for running locally
m2Giles Nov 10, 2024
5eddfce
schedule not scheduled
m2Giles Nov 10, 2024
d20605c
fix skopeo permissions
m2Giles Nov 10, 2024
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
113 changes: 10 additions & 103 deletions .github/workflows/reusable-build-iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,126 +40,33 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Matrix Variables
- name: Image Name
run: |
if [[ "${{ matrix.image_flavor }}" == "main" ]]; then
echo "IMAGE_NAME=${{ matrix.base_name }}" >> $GITHUB_ENV
else
echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV
fi
if [[ ${{ matrix.base_name }} =~ bluefin ]]; then
echo "VARIANT=Silverblue" >> $GITHUB_ENV
elif [[ ${{ matrix.base_name }} =~ aurora ]]; then
echo "VARIANT=Kinoite" >> $GITHUB_ENV
fi

- name: Get Current Fedora Version
id: labels
- name: Build ISO
shell: bash
run: |
set -eo pipefail
kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ matrix.stream_name }} | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
fedora_version=$(echo $kernel_release | grep -oP 'fc\K[0-9]+')
echo "kernel_release=$kernel_release" >> $GITHUB_OUTPUT
echo "fedora_version=$fedora_version" >> $GITHUB_OUTPUT

- name: Set Image Tag
id: generate-tag
shell: bash
run: |
TAG="${{ matrix.stream_name }}"

if [[ "${{ github.ref_name }}" == "testing" ]]; then
TAG="testing-${TAG}"
fi

# Would like to implement in the future. This will allow us to support image tags from a PR.
#if [[ github.event.number ]]; then
# TAG="pr-${{ github.event.number }}-${{ matrix.stream_name }}"
#fi

echo "tag=${TAG}" >> $GITHUB_OUTPUT

- name: Set Flatpaks Directory Shortname
id: generate-flatpak-dir-shortname
shell: bash
run: |
if [[ "${{ env.IMAGE_NAME }}" =~ bluefin ]]; then
FLATPAK_DIR_SHORTNAME="bluefin_flatpaks"
elif [[ "${{ env.IMAGE_NAME }}" =~ aurora ]]; then
FLATPAK_DIR_SHORTNAME="aurora_flatpaks"
fi
echo "flatpak-dir-shortname=${FLATPAK_DIR_SHORTNAME}" >> $GITHUB_OUTPUT

- name: Determine Flatpak Dependencies
id: flatpak_dependencies
shell: bash
run: |
set -ex
image="ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ matrix.stream_name }}"
# Make temp space
TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p ${{ github.workspace }} flatpak.XXX)
# Get list of refs from directory
FLATPAK_REFS_DIR=${{ github.workspace }}/${{ steps.generate-flatpak-dir-shortname.outputs.flatpak-dir-shortname }}
FLATPAK_REFS_DIR_LIST=$(cat ${FLATPAK_REFS_DIR}/* | tr '\n' ' ' )
DX_FLATPAK_REFS_DIR_LIST="$(cat dx_flatpaks/* | tr '\n' ' ' )"
if [[ ${{ env.IMAGE_NAME }} == *"-dx"* ]]; then
FLATPAK_REFS_DIR_LIST="${FLATPAK_REFS_DIR_LIST} ${DX_FLATPAK_REFS_DIR_LIST}"
fi
# Generate install script
cat << EOF > ${TEMP_FLATPAK_INSTALL_DIR}/script.sh
cat /temp_flatpak_install_dir/script.sh
mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp || true
chmod -R 1777 /var/tmp
flatpak config --system --set languages "*"
flatpak remote-add --system flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --system -y ${FLATPAK_REFS_DIR_LIST}
ostree refs --repo=\${FLATPAK_SYSTEM_DIR}/repo | grep '^deploy/' | grep -v 'org\.freedesktop\.Platform\.openh264' | sed 's/^deploy\///g' > /output/flatpaks_with_deps
EOF
docker run --rm --privileged \
--entrypoint bash \
-e FLATPAK_SYSTEM_DIR=/flatpak/flatpak \
-e FLATPAK_TRIGGERSDIR=/flatpak/triggers \
--volume ${FLATPAK_REFS_DIR}:/output \
--volume ${TEMP_FLATPAK_INSTALL_DIR}:/temp_flatpak_install_dir \
${image} /temp_flatpak_install_dir/script.sh
docker rmi ${image}

- name: Build ISOs
uses: jasonn3/build-container-installer@a1ce6da2d6c1af0561bec053366d0f3aa7e38743 # v1.2.3
id: build
with:
arch: x86_64
image_name: ${{ env.IMAGE_NAME }}
image_repo: ghcr.io/ublue-os
variant: ${{ env.VARIANT }}
version: ${{ steps.labels.outputs.fedora_version }}
image_tag: ${{ steps.generate-tag.outputs.tag }}
secure_boot_key_url: "https://github.com/ublue-os/akmods/raw/main/certs/public_key.der"
enrollment_password: "universalblue"
iso_name: ${{ env.IMAGE_NAME }}-${{ steps.generate-tag.outputs.tag }}.iso
enable_cache_dnf: "false"
enable_cache_skopeo: "false"
flatpak_remote_refs_dir: ${{ steps.generate-flatpak-dir-shortname.outputs.flatpak-dir-shortname }}
enable_flatpak_dependencies: "false"
sudo just build-iso-ghcr "${{ matrix.base_name }} ${{ matrix.stream_name }} ${{ matrix.image_flavor }}"
image_name="$(just image_name ${{ matrix.base_name }} ${{ matrix.image_flavor }})"
echo "IMAGE_NAME=${image_name}" >> $GITHUB_ENV
echo "ISO_BUILD_DIR=${{ github.workspace }}/${image_name}_build" >> $GITHUB_ENV
echo "ISO_NAME=${image_name}.iso" >> $GITHUB_ENV

- name: Move ISOs to Upload Directory
id: upload-directory
shell: bash
run: |
ISO_UPLOAD_DIR=${{ github.workspace }}/upload
mkdir ${ISO_UPLOAD_DIR}
mv ${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }} ${ISO_UPLOAD_DIR}
mv ${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM ${ISO_UPLOAD_DIR}
mv ${{ env.ISO_BUILD_DIR }}/${{ env.ISO_NAME }} ${ISO_UPLOAD_DIR}
mv ${{ env.ISO_BUILD_DIR }}/${{ env.ISO_NAME }}-CHECKSUM ${ISO_UPLOAD_DIR}
echo "iso-upload-dir=${ISO_UPLOAD_DIR}" >> $GITHUB_OUTPUT

- name: Upload ISOs and Checksum to Job Artifacts
if: github.ref_name == 'testing'
#if: github.event_name == 'pull_request'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: ${{ steps.build.outputs.iso_name }}
name: ${{ env.ISO_NAME }}
path: ${{ steps.upload-directory.outputs.iso-upload-dir }}
if-no-files-found: error
retention-days: 0
Expand Down
Loading
Loading