-
-
Notifications
You must be signed in to change notification settings - Fork 176
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): switch to upstream action and update workflows #1034
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
db4f505
chore(ci): switch to upstream action (#1021)
noelmiller 0ae2177
Merge branch 'main' into testing
noelmiller f837bc5
chore(ci): Use flatpak folders and dependency resolution [ISO] (#1038)
noelmiller 00f36b0
Merge branch 'main' into testing
noelmiller 5a8c9e9
chore(ci): deleted not needed text file
noelmiller 3660f8d
chore(ci): create flathub --user repo
noelmiller f635786
chore(ci): enable global
noelmiller 9b095e0
chore(ci): disable surface temporarily
noelmiller 9969d2f
chore(ci): switch to release
noelmiller 00c885c
chore(ci): rename ublue-system-flatpak-manager.service and update con…
noelmiller be97a24
chore(ci): remove --global and debug ref_name
noelmiller cdb4fd2
chore(ci): fixup capitalization and fixup tag
noelmiller 4962cee
chore(ci): cleaned up formatting and using version 1.1.1
noelmiller 5f7d2d0
chore(ci): Add as user service instead
noelmiller 4c27dc2
chore(ci): fixup ublue-flatpak-manager to only run once
noelmiller a8cd7c0
chore(ci): changed WantedBy to default.target
noelmiller 8eefca0
Merge branch 'main' into testing
noelmiller 42ece0b
chore(ci): fixup merge conflict
noelmiller 1dbd2c4
chore(ci): add surface back
noelmiller 8422691
Merge branch 'main' into testing
noelmiller 16014cc
chore(ci): add framework back
noelmiller 00f44fc
chore(ci): move include back up
noelmiller 536829e
chore(ci): remove debug statement
noelmiller 32bed5d
Merge branch 'main' into testing
noelmiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,140 @@ | ||
name: Build Bluefin ISOs | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/build_iso.yml' | ||
|
||
env: | ||
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-iso | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-iso: | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
container: | ||
image: fedora:${{ matrix.major_version }} | ||
options: "--privileged" | ||
volumes: | ||
- "/:/host" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image_name: [bluefin, bluefin-nvidia, bluefin-asus, bluefin-asus-nvidia, bluefin-surface, bluefin-surface-nvidia, bluefin-dx, bluefin-dx-nvidia, bluefin-dx-asus, bluefin-dx-surface, bluefin-dx-asus-nvidia, bluefin-dx-surface-nvidia] | ||
image_name: | ||
- bluefin | ||
- bluefin-nvidia | ||
- bluefin-asus | ||
- bluefin-asus-nvidia | ||
- bluefin-surface | ||
- bluefin-surface-nvidia | ||
- bluefin-dx | ||
- bluefin-dx-nvidia | ||
- bluefin-dx-asus | ||
- bluefin-dx-surface | ||
- bluefin-dx-asus-nvidia | ||
- bluefin-dx-surface-nvidia | ||
major_version: [38, 39] | ||
image_tag: [latest, gts] | ||
exclude: | ||
- major_version: 38 | ||
image_tag: latest | ||
image_name: bluefin-asus | ||
- major_version: 38 | ||
image_name: bluefin-asus-nvidia | ||
- major_version: 38 | ||
image_name: bluefin-dx-asus | ||
- major_version: 38 | ||
image_name: bluefin-dx-asus-nvidia | ||
include: | ||
- major_version: 38 | ||
is_gts_version: true | ||
- major_version: 39 | ||
image_tag: gts | ||
is_gts_version: false | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/[email protected] | ||
p5 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Image Tag | ||
id: generate-tag | ||
shell: bash | ||
run: | | ||
TAG="latest" | ||
|
||
if [[ ${{ matrix.is_gts_version }} == "true" ]]; then | ||
TAG="gts" | ||
fi | ||
|
||
if [[ "${{ github.ref_name }}" == "testing" ]]; then | ||
if [[ "${{ matrix.is_gts_version }}" == "true" ]]; then | ||
TAG="gts-testing" | ||
else | ||
TAG="testing" | ||
fi | ||
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.major_version }}" | ||
#fi | ||
|
||
echo "tag=${TAG}" >> $GITHUB_OUTPUT | ||
|
||
- name: Determine Flatpak Dependencies | ||
id: flatpak_dependencies | ||
shell: bash | ||
run: | | ||
set -ex | ||
image="ghcr.io/ublue-os/${{ matrix.image_name }}:${{ steps.generate-tag.outputs.tag }}" | ||
# 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 }}/flatpaks | ||
FLATPAK_REFS_DIR_LIST=$(cat ${FLATPAK_REFS_DIR}/* | tr '\n' ' ' ) | ||
# 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: ublue-os/[email protected] | ||
uses: jasonn3/[email protected] | ||
id: build | ||
with: | ||
ARCH: x86_64 | ||
IMAGE_NAME: ${{ matrix.image_name }} | ||
IMAGE_REPO: ghcr.io/ublue-os | ||
VARIANT: 'Silverblue' | ||
VERSION: ${{ matrix.major_version }} | ||
IMAGE_TAG: ${{ matrix.image_tag }} | ||
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' | ||
ENROLLMENT_PASSWORD: 'ublue-os' | ||
arch: x86_64 | ||
image_name: ${{ matrix.image_name }} | ||
image_repo: ghcr.io/ublue-os | ||
variant: 'Silverblue' | ||
version: ${{ matrix.major_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: 'ublue-os' | ||
iso_name: ${{ matrix.image_name }}-${{ steps.generate-tag.outputs.tag }} | ||
enable_cache_dnf: "false" | ||
enable_cache_skopeo: "false" | ||
flatpak_remote_refs_dir: /github/workspace/flatpaks | ||
enable_flatpak_dependencies: "false" | ||
|
||
- name: Upload ISOs and Checksum to Job Artifacts | ||
if: github.event_name == 'pull_request' | ||
if: github.ref_name == 'testing' | ||
#if: github.event_name == 'pull_request' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.image_name }}-${{ matrix.image_tag }}-${{ matrix.major_version}} | ||
path: ${{ steps.build.outputs.output-directory }} | ||
name: ${{ steps.build.outputs.iso_name }} | ||
path: | | ||
${{ steps.build.outputs.iso_path }} | ||
${{ steps.build.outputs.iso_path }}-CHECKSUM | ||
if-no-files-found: error | ||
retention-days: 0 | ||
compression-level: 0 | ||
|
@@ -72,7 +150,10 @@ jobs: | |
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | ||
RCLONE_CONFIG_R2_REGION: auto | ||
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} | ||
SOURCE_DIR: ${{ steps.build.outputs.output-directory }} | ||
SOURCE_ISO: ${{ steps.build.outputs.iso_path }} | ||
SOURCE_ISO_CHECKSUM: ${{ steps.build.outputs.iso_path }}-CHECKSUM | ||
run: | | ||
dnf install -y rclone | ||
rclone copy $SOURCE_DIR R2:bluefin | ||
apt-get update | ||
apt-get install -y rclone | ||
rclone copy $SOURCE_ISO R2:bluefin | ||
rclone copy $SOURCE_ISO_CHECKSUM R2:bluefin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
app/io.github.dvlv.boxbuddyrs/x86_64/stable | ||
app/io.github.celluloid_player.Celluloid/x86_64/stable | ||
app/org.fedoraproject.MediaWriter/x86_64/stable | ||
app/com.github.tchx84.Flatseal/x86_64/stable | ||
app/io.github.flattool.Warehouse/x86_64/stable | ||
app/org.gnome.baobab/x86_64/stable | ||
app/org.gnome.Calculator/x86_64/stable | ||
app/org.gnome.Calendar/x86_64/stable | ||
app/org.gnome.Characters/x86_64/stable | ||
app/org.gnome.clocks/x86_64/stable | ||
app/org.gnome.Connections/x86_64/stable | ||
app/org.gnome.Contacts/x86_64/stable | ||
app/org.gnome.Evince/x86_64/stable | ||
app/com.mattjakeman.ExtensionManager/x86_64/stable | ||
app/org.gnome.font-viewer/x86_64/stable | ||
app/org.gnome.Logs/x86_64/stable | ||
app/org.gnome.Loupe/x86_64/stable | ||
app/org.gnome.Maps/x86_64/stable | ||
app/org.gnome.NautilusPreviewer/x86_64/stable | ||
app/org.gnome.TextEditor/x86_64/stable | ||
app/org.gnome.Weather/x86_64/stable | ||
app/io.missioncenter.MissionCenter/x86_64/stable | ||
app/org.mozilla.firefox/x86_64/stable | ||
app/org.mozilla.Thunderbird/x86_64/stable |
15 changes: 0 additions & 15 deletions
15
usr/lib/systemd/system/ublue-system-flatpak-manager.service
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...d/user/ublue-user-flatpak-manager.service → ...ystemd/user/ublue-flatpak-manager.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO controlling stuff like whether to push to R2 or GHA, and the channel (stable / testing) should be controlled in the calling workflow and not the reusable workflow, but this is a nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better, but we currently manually call
build_iso.yml
on it's own for uploading ISOs, so it needs to operate independently of the other workflow.