From f0537de2c808b6e12fdb3962e401bc34389aefa6 Mon Sep 17 00:00:00 2001 From: Marco Ceppi Date: Sat, 25 Mar 2023 16:57:46 -0400 Subject: [PATCH] fix: maintain oci image version from upstream (#76) --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 862a5070..6bba3f0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -296,7 +296,14 @@ jobs: fi # DEBUG: get character count of key wc -c certs/private_key.priv - + + - name: Get current version + id: labels + run: | + docker pull ghcr.io/ublue-os/${{ matrix.image_name }}-main:${{ matrix.major_version }} + ver=$(docker inspect ghcr.io/ublue-os/${{ matrix.image_name }}-main:${{ matrix.major_version }} | jq -r '.[].Config.Labels["org.opencontainers.image.version"]') + echo "VERSION=$ver" >> $GITHUB_OUTPUT + # Build metadata - name: Image Metadata uses: docker/metadata-action@v4 @@ -307,6 +314,7 @@ jobs: labels: | org.opencontainers.image.title=${{ env.IMAGE_NAME }} org.opencontainers.image.description=ublue-os ${{ matrix.image_name }} with Nvidia drivers added + org.opencontainers.image.version=${{ steps.labels.outputs.VERSION }} io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/main/README.md io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/1728152?s=200&v=4 # Build image using Buildah action