From ab713b7feedbdfd61651a0feb5c42141879bc3ab Mon Sep 17 00:00:00 2001 From: zilla <9803299+bigpick@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:36:22 -0500 Subject: [PATCH] fix: Update version setting script (#3) --- .github/workflows/docker-image.yml | 2 +- .github/workflows/publish-docker-image.yml | 11 ++++------- Dockerfile | 2 +- VERSION | 2 +- scripts/get-vers | 3 +++ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 20b2c5d..5fe67a6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,6 +8,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build the Docker image run: make diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml index 0534883..c58852b 100644 --- a/.github/workflows/publish-docker-image.yml +++ b/.github/workflows/publish-docker-image.yml @@ -25,10 +25,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and publish the Docker image - run: make OFFICIAL_BUILD=y PUBLISH=y - - #- name: Extract metadata (tags, labels) for Docker - # id: meta - # uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - # with: - # images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + env: + OFFICIAL_BUILD: y + PUBLISH: y + run: make diff --git a/Dockerfile b/Dockerfile index fc09db5..128d355 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM nvidia/cuda:12.3.0-devel-ubuntu22.04 LABEL org.opencontainers.image.licenses=MIT -LABEL org.opencontainers.image.description="Up to date CUDA container built to be a one-click runnable Hashtopolis agent to use on VastAI" +LABEL org.opencontainers.image.description="Up-to-date CUDA container built to be a one-click runnable Hashtopolis agent to use on Vast.ai." LABEL org.opencontainers.image.source=https://github.com/ThatOnePasswordWas40Passwords/vast-hashtopolis-runner ENV DEBIAN_FRONTEND=NONINTERACTIVE diff --git a/VERSION b/VERSION index 6e8bf73..17e51c3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/scripts/get-vers b/scripts/get-vers index 1d62887..fc2bfe3 100755 --- a/scripts/get-vers +++ b/scripts/get-vers @@ -7,11 +7,14 @@ dir=$PWD [[ "${1-}" != "" ]] && dir=${1} if [[ "${IMG_VERSION-}" != "" ]]; then + echo "=> Detected previously set IMG_VERSION" 1>&2; echo "${IMG_VERSION}" else if [[ "${OFFICIAL_BUILD-}" != "" ]]; then + echo "=> Detected OFFICIAL_BUILD, using in file VERSION" 1>&2; cat "${dir}/VERSION" else + echo "=> Did not detect OFFICIAL_BUILD envar, using current git sha" 1>&2; echo "0.0.0+$(git rev-parse --short HEAD)" fi fi