From 4527295bb7452e577522bc3dfece755082b05e78 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 16:34:10 +0300 Subject: [PATCH 1/4] chore: tidy tag gen, use correct major ver --- .github/workflows/build.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37257b7..7dbc057 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,26 +56,18 @@ jobs: run: | # Generate a timestamp for creating an image version history TIMESTAMP="$(date +%Y%m%d)" - MAJOR_VERSION="${{ matrix.major_version }}" + MAJOR_VERSION="${{ env.FEDORA_MAJOR_VERSION }}" COMMIT_TAGS=() BUILD_TAGS=() # Have tags for tracking builds during pull request SHA_SHORT="$(git rev-parse --short HEAD)" COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}") COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}") - if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \ - [[ "${{ matrix.is_stable_version }}" == "true" ]]; then - COMMIT_TAGS+=("pr-${{ github.event.number }}") - COMMIT_TAGS+=("${SHA_SHORT}") - fi BUILD_TAGS=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}") - if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \ - [[ "${{ matrix.is_stable_version }}" == "true" ]]; then - BUILD_TAGS+=("${TIMESTAMP}") - BUILD_TAGS+=("latest") - fi + BUILD_TAGS+=("${TIMESTAMP}") + BUILD_TAGS+=("latest") if [[ "${{ github.event_name }}" == "pull_request" ]]; then echo "Generated the following commit tags: " From 3b6434651709876fa88658f634625b315a54fbe6 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 16:34:42 +0300 Subject: [PATCH 2/4] chore: remove unused matrix vars --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7dbc057..c555207 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,11 +30,7 @@ jobs: strategy: fail-fast: false matrix: - major_version: [37] - include: - - major_version: 37 - is_latest_version: true - is_stable_version: true + steps: # Checkout push-to-registry action GitHub repository - name: Checkout Push to Registry action From 1bfabe674e92dd5bf7fc12956941857de4eacd0a Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 16:36:28 +0300 Subject: [PATCH 3/4] feat: use a recipe matrix --- .github/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c555207..86b5471 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,8 @@ jobs: strategy: fail-fast: false matrix: + recipe: + - recipe.yml steps: # Checkout push-to-registry action GitHub repository @@ -41,10 +43,10 @@ jobs: - name: Gather image data from recipe run: | - echo "IMAGE_NAME=$(yq '.name' ./recipe.yml)" >> $GITHUB_ENV - echo "IMAGE_DESCRIPTION=$(yq '.description' ./recipe.yml)" >> $GITHUB_ENV - echo "FEDORA_MAJOR_VERSION=$(yq '.fedora-version' ./recipe.yml)" >> $GITHUB_ENV - echo "BASE_CONTAINER_URL=$(yq '.base-container' ./recipe.yml)" >> $GITHUB_ENV + echo "IMAGE_NAME=$(yq '.name' ./${{ matrix.recipe }})" >> $GITHUB_ENV + echo "IMAGE_DESCRIPTION=$(yq '.description' ./${{ matrix.recipe }})" >> $GITHUB_ENV + echo "FEDORA_MAJOR_VERSION=$(yq '.fedora-version' ./${{ matrix.recipe }})" >> $GITHUB_ENV + echo "BASE_CONTAINER_URL=$(yq '.base-container' ./${{ matrix.recipe }})" >> $GITHUB_ENV - name: Generate tags id: generate-tags From 47d7caf7fb3671852a32bbe75facc6a8b0a05cb6 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 16:44:29 +0300 Subject: [PATCH 4/4] chore: test with two recipes --- .github/workflows/build.yml | 1 + recipe-38.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 recipe-38.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86b5471..3670612 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,7 @@ jobs: matrix: recipe: - recipe.yml + - recipe-38.yml steps: # Checkout push-to-registry action GitHub repository diff --git a/recipe-38.yml b/recipe-38.yml new file mode 100644 index 0000000..7087968 --- /dev/null +++ b/recipe-38.yml @@ -0,0 +1,30 @@ +# the image will be at ghcr.io/yourusername/name +name: startingpoint + +# what native container image to build on top of +# images not built by ublue might function unexpectly +base-container: ghcr.io/ublue-os/silverblue-main + +# what fedora version to use, you can just change this to update +fedora-version: 38 + +# this description will be visible in the containers metadata +description: A starting point for further customization of uBlue images. Make your own! https://ublue.it/making-your-own/ + +# these rpms will be installed from the fedora repository +# using rpm-ostree and will be preinstalled in the final image +rpms: + - python3-pip # needed for yafti (the first boot installer) + +# these flatpaks (from flathub) will be available for install on boot +# this is just an example selection, and even if you leave it empty, +# you'll have the basic options available in yafti +flatpaks: + - org.mozilla.firefox + - org.mozilla.Thunderbird + - com.mattjakeman.ExtensionManager + - org.libreoffice.LibreOffice + - org.gnome.DejaDup + - org.gustavoperedo.FontDownloader + - com.github.tchx84.Flatseal + - io.github.celluloid_player.Celluloid