From 0a87c7b3012cc0cac84e6aad73141a99744c88d6 Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Fri, 21 Jul 2023 08:35:24 -0700 Subject: [PATCH] fixed workflow added back variable in containerfile --- .github/workflows/build.yml | 23 +++++++++++------------ Containerfile | 1 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a36203b3c6..5943fb9387 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,8 @@ on: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch workflow_dispatch: -# env: -# IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} +env: + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} jobs: push-ghcr: @@ -63,7 +63,6 @@ jobs: echo "IMAGE_DESCRIPTION=$(yq '.description' ./${{ matrix.recipe }})" >> $GITHUB_ENV echo "FEDORA_MAJOR_VERSION=$(yq '.fedora-version' ./${{ matrix.recipe }})" >> $GITHUB_ENV echo "BASE_IMAGE_URL=$(yq '.base-image' ./${{ matrix.recipe }})" >> $GITHUB_ENV - echo "IMAGE_REGISTRY=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_ENV - name: Generate tags id: generate-tags @@ -119,6 +118,14 @@ jobs: io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/startingpoint/main/README.md io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4 + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. + # https://github.com/macbre/push-to-ghcr/issues/12 + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@v5 + with: + string: ${{ env.IMAGE_REGISTRY }} + # Build image using Buildah action - name: Build Image id: build_image @@ -133,18 +140,10 @@ jobs: FEDORA_MAJOR_VERSION=${{ env.FEDORA_MAJOR_VERSION }} BASE_IMAGE_URL=${{ env.BASE_IMAGE_URL }} RECIPE=${{ matrix.recipe }} - IMAGE_REGISTRY=${{ env.IMAGE_REGISTRY }} + IMAGE_REGISTRY=${{ steps.registry_case.outputs.lowercase }} labels: ${{ steps.meta.outputs.labels }} oci: false - # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. - # https://github.com/macbre/push-to-ghcr/issues/12 - - name: Lowercase Registry - id: registry_case - uses: ASzc/change-string-case-action@v5 - with: - string: ${{ env.IMAGE_REGISTRY }} - # Push the image to GHCR (Image Registry) - name: Push To GHCR uses: redhat-actions/push-to-registry@v2 diff --git a/Containerfile b/Containerfile index e5fa9b3f22..afbb9428f0 100644 --- a/Containerfile +++ b/Containerfile @@ -8,6 +8,7 @@ ARG FEDORA_MAJOR_VERSION=38 # Warning: changing this might not do anything for you. Read comment above. ARG BASE_IMAGE_URL=quay.io/fedora-ostree-desktops/base +ARG IMAGE_REGISTRY=ghcr.io/ublue-os FROM ${BASE_IMAGE_URL}:${FEDORA_MAJOR_VERSION}