From d7ff16c3fc05eda792928bc21deba9cfd1a15105 Mon Sep 17 00:00:00 2001 From: badbl0cks <4161747+badbl0cks@users.noreply.github.com> Date: Tue, 29 Oct 2024 19:56:27 -0700 Subject: [PATCH] Change FEDORA_VERSION to latest, rename build.yml to build-kde.yml to be more specific, rename packages bazzite-custom-gnome => bazzite-badblocks-gnome and bazzite-custom => bazzite-badblocks-kde --- .github/workflows/build-gnome.yml | 53 +++++++++---------- .../workflows/{build.yml => build-kde.yml} | 53 +++++++++---------- README.md | 4 +- 3 files changed, 54 insertions(+), 56 deletions(-) rename .github/workflows/{build.yml => build-kde.yml} (82%) diff --git a/.github/workflows/build-gnome.yml b/.github/workflows/build-gnome.yml index 2228d4f..dd5f5b8 100644 --- a/.github/workflows/build-gnome.yml +++ b/.github/workflows/build-gnome.yml @@ -1,11 +1,11 @@ --- -name: build-bazzite-gnome-stable-40 +name: build-bazzite-gnome on: pull_request: branches: - main schedule: - - cron: '05 10 * * 0' # 10:05am UTC every Sunday + - cron: '05 05 * * ' # 05:05am UTC everyday push: branches: - main @@ -14,18 +14,16 @@ on: workflow_dispatch: env: - MY_IMAGE_NAME: "bazzite-gnome-custom" # the name of the image produced by this build - MY_IMAGE_DESC: "badblocks's custom bazzite-gnome build" - MAJOR_VERSION: "40" SOURCE_IMAGE: "bazzite" SOURCE_SUFFIX: "-gnome" - VERSION_SUFFIX: "stable" + MY_IMAGE_NAME: "${{SOURCE_IMAGE}}-badblocks-gnome" # the name of the image produced by this build + MY_IMAGE_DESC: "badblocks's custom bazzite-gnome build" IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit jobs: build_push: name: Build and push image - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: contents: read @@ -35,7 +33,10 @@ jobs: steps: # Checkout push-to-registry action GitHub repository - name: Checkout Push to Registry action - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Maximize build space + uses: ublue-os/remove-unwanted-software@v7 - name: Generate tags id: generate-tags @@ -55,20 +56,18 @@ jobs: for TAG in "${BUILD_TAGS[@]}"; do BUILD_TAGS+=("${TAG}-${TIMESTAMP}") done - - if [[ ${{ github.ref_name }} == "unstable" ]]; then - BUILD_TAGS+=("${MAJOR_VERSION}-unstable" "${MAJOR_VERSION}-unstable-${TIMESTAMP}") - BUILD_TAGS+=("unstable") - elif [[ ${{ github.ref_name }} == "testing" ]]; then - BUILD_TAGS+=("${MAJOR_VERSION}-testing" "${MAJOR_VERSION}-testing-${TIMESTAMP}") - BUILD_TAGS+=("testing") - else - BUILD_TAGS+=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}") - BUILD_TAGS+=("${MAJOR_VERSION}-stable" "${MAJOR_VERSION}-stable-${TIMESTAMP}") - BUILD_TAGS+=("latest" "stable") - fi BUILD_TAGS+=("${TIMESTAMP}") + if [[ ${{ github.ref_name }} == "unstable" ]]; then + BUILD_TAGS+=("unstable") + SOURCE_VERSION="unstable" + elif [[ ${{ github.ref_name }} == "testing" ]]; then + BUILD_TAGS+=("testing") + SOURCE_VERSION="testing" + else + BUILD_TAGS+=("latest" "stable") + SOURCE_VERSION="latest" + fi if [[ "${{ github.event_name }}" == "pull_request" ]]; then echo "Generated the following commit tags: " @@ -90,7 +89,7 @@ jobs: # Build metadata - name: Image Metadata - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 id: meta with: images: | @@ -114,7 +113,7 @@ jobs: build-args: | SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} SOURCE_SUFFIX=${{ env.SOURCE_SUFFIX }} - FEDORA_VERSION=${{ env.MAJOR_VERSION }}-${{ env.VERSION_SUFFIX }} + FEDORA_VERSION=${{ env.SOURCE_VERSION }} tags: | ${{ steps.generate-tags.outputs.alias_tags }} labels: ${{ steps.meta.outputs.labels }} @@ -124,12 +123,12 @@ jobs: # https://github.com/macbre/push-to-ghcr/issues/12 - name: Lowercase Registry id: registry_case - uses: ASzc/change-string-case-action@v5 + uses: ASzc/change-string-case-action@v6 with: string: ${{ env.IMAGE_REGISTRY }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -150,13 +149,13 @@ jobs: extra-args: | --disable-content-trust - # This section is optional and only needs to be enabled in you plan on distributing - # your project to others to consume. You will need to create a public and private key + # This section is optional and only needs to be enabled if you plan on distributing + # your project for others to consume. You will need to create a public and private key # using Cosign and save the private key as a repository secret in Github for this workflow # to consume. For more details, review the image signing section of the README. # Sign container - - uses: sigstore/cosign-installer@v3.4.0 + - uses: sigstore/cosign-installer@v3.5.0 if: github.event_name != 'pull_request' - name: Sign container image diff --git a/.github/workflows/build.yml b/.github/workflows/build-kde.yml similarity index 82% rename from .github/workflows/build.yml rename to .github/workflows/build-kde.yml index 2d0f40c..d78020a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-kde.yml @@ -1,11 +1,11 @@ --- -name: build-bazzite-stable-40 +name: build-bazzite-kde on: pull_request: branches: - main schedule: - - cron: '05 10 * * 0' # 10:05am UTC every Sunday + - cron: '05 05 * * ' # 05:05am UTC everyday push: branches: - main @@ -14,18 +14,16 @@ on: workflow_dispatch: env: - MY_IMAGE_NAME: "bazzite-custom" # the name of the image produced by this build - MY_IMAGE_DESC: "badblocks's custom bazzite build" - MAJOR_VERSION: "40" SOURCE_IMAGE: "bazzite" SOURCE_SUFFIX: "" - VERSION_SUFFIX: "stable" + MY_IMAGE_NAME: "${{SOURCE_IMAGE}}-badblocks-kde" # the name of the image produced by this build + MY_IMAGE_DESC: "badblocks's custom bazzite build" IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit jobs: build_push: name: Build and push image - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: contents: read @@ -35,7 +33,10 @@ jobs: steps: # Checkout push-to-registry action GitHub repository - name: Checkout Push to Registry action - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Maximize build space + uses: ublue-os/remove-unwanted-software@v7 - name: Generate tags id: generate-tags @@ -55,20 +56,18 @@ jobs: for TAG in "${BUILD_TAGS[@]}"; do BUILD_TAGS+=("${TAG}-${TIMESTAMP}") done - - if [[ ${{ github.ref_name }} == "unstable" ]]; then - BUILD_TAGS+=("${MAJOR_VERSION}-unstable" "${MAJOR_VERSION}-unstable-${TIMESTAMP}") - BUILD_TAGS+=("unstable") - elif [[ ${{ github.ref_name }} == "testing" ]]; then - BUILD_TAGS+=("${MAJOR_VERSION}-testing" "${MAJOR_VERSION}-testing-${TIMESTAMP}") - BUILD_TAGS+=("testing") - else - BUILD_TAGS+=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}") - BUILD_TAGS+=("${MAJOR_VERSION}-stable" "${MAJOR_VERSION}-stable-${TIMESTAMP}") - BUILD_TAGS+=("latest" "stable") - fi BUILD_TAGS+=("${TIMESTAMP}") + if [[ ${{ github.ref_name }} == "unstable" ]]; then + BUILD_TAGS+=("unstable") + SOURCE_VERSION="unstable" + elif [[ ${{ github.ref_name }} == "testing" ]]; then + BUILD_TAGS+=("testing") + SOURCE_VERSION="testing" + else + BUILD_TAGS+=("latest" "stable") + SOURCE_VERSION="latest" + fi if [[ "${{ github.event_name }}" == "pull_request" ]]; then echo "Generated the following commit tags: " @@ -90,7 +89,7 @@ jobs: # Build metadata - name: Image Metadata - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 id: meta with: images: | @@ -114,7 +113,7 @@ jobs: build-args: | SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} SOURCE_SUFFIX=${{ env.SOURCE_SUFFIX }} - FEDORA_VERSION=${{ env.MAJOR_VERSION }}-${{ env.VERSION_SUFFIX }} + FEDORA_VERSION=${{ env.SOURCE_VERSION }} tags: | ${{ steps.generate-tags.outputs.alias_tags }} labels: ${{ steps.meta.outputs.labels }} @@ -124,12 +123,12 @@ jobs: # https://github.com/macbre/push-to-ghcr/issues/12 - name: Lowercase Registry id: registry_case - uses: ASzc/change-string-case-action@v5 + uses: ASzc/change-string-case-action@v6 with: string: ${{ env.IMAGE_REGISTRY }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -150,13 +149,13 @@ jobs: extra-args: | --disable-content-trust - # This section is optional and only needs to be enabled in you plan on distributing - # your project to others to consume. You will need to create a public and private key + # This section is optional and only needs to be enabled if you plan on distributing + # your project for others to consume. You will need to create a public and private key # using Cosign and save the private key as a repository secret in Github for this workflow # to consume. For more details, review the image signing section of the README. # Sign container - - uses: sigstore/cosign-installer@v3.4.0 + - uses: sigstore/cosign-installer@v3.5.0 if: github.event_name != 'pull_request' - name: Sign container image diff --git a/README.md b/README.md index b7e35a1..0558902 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # How to Use -`rpm-ostree rebase ostree-image-signed:docker://ghcr.io/badbl0cks/bazzite-custom` +`rpm-ostree rebase ostree-image-signed:docker://ghcr.io/badbl0cks/bazzite-badblocks-kde` or -`rpm-ostree rebase ostree-image-signed:docker://ghcr.io/badbl0cks/bazzite-gnome-custom` +`rpm-ostree rebase ostree-image-signed:docker://ghcr.io/badbl0cks/bazzite-badblocks-gnome`