Skip to content

Commit

Permalink
chore(ci): simplify ISO workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles committed Jun 30, 2024
1 parent 11b0310 commit 974df5d
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/reusable-build-iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,48 +70,29 @@ jobs:
elif [[ ${{ inputs.brand_name }} == "aurora" ]]; then
echo "VARIANT=Kinoite" >> $GITHUB_ENV
fi
if [[ ${{ inputs.fedora_version }} == "gts" ]]; then
echo "IS_GTS_VERSION=true" >> $GITHUB_ENV
elif [[ ${{ inputs.fedora_version }} == "stable" ]]; then
echo "IS_STABLE_VERSION=true" >> $GITHUB_ENV
elif [[ ${{ inputs.fedora_version }} == "latest" ]]; then
echo "IS_LATEST_VERSION=true" >> $GITHUB_ENV
fi
- name: Get Current Fedora Version
id: labels
shell: bash
run: |
set -eo pipefail
if [[ ${{ matrix.fedora_version }} == "stable" ]]; then
kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/bluefin:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
elif [[ ${{ matrix.fedora_version }} == "gts" ]]; then
kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/bluefin:gts | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
else
kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ matrix.fedora_version }} | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
fi
fedora_version=$(echo $KERNEL_RELEASE | grep -oP 'fc\K[0-9]+')
kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ inputs.fedora_version }} | 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: |
if [[ "${{ env.IS_LATEST_VERSION }}" == "true" ]]; then
TAG="latest"
elif [[ "${{ env.IS_STABLE_VERSION }}" == "true" ]]; then
TAG="stable"
elif [[ "${{ env.IS_GTS_VERSION }}" == "true" ]]; then
TAG="gts"
fi
TAG="${{ inputs.fedora_version }}"
if [[ "${{ github.ref_name }}" == "testing" ]]; then
if [[ "${{ env.IS_GTS_VERSION }}" == "true" ]]; then
if [[ "${{ inputs.fedora_version }}" == "true" ]]; then
TAG="gts-testing"
elif [[ "${{ env.IS_STABLE_VERSION }}" == "true" ]]; then
elif [[ "${{ inputs.fedora_version }}" == "true" ]]; then
TAG="stable-testing"
elif [[ "${{ env.IS_LATEST_VERSION }}" == "true" ]]; then
elif [[ "${{ inputs.fedora_version }}" == "true" ]]; then
TAG="testing"
fi
fi
Expand Down Expand Up @@ -139,7 +120,7 @@ jobs:
shell: bash
run: |
set -ex
image="ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ matrix.fedora_version }}"
image="ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ inputs.fedora_version }}"
# Make temp space
TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p ${{ github.workspace }} flatpak.XXX)
# Get list of refs from directory
Expand Down

0 comments on commit 974df5d

Please sign in to comment.