From 13bff202161ac359be6d80c25dbfa055a0435aef Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Fri, 26 Apr 2024 19:36:15 -0300 Subject: [PATCH] update release-containers.yaml workflow - use env vars --- .github/workflows/release-containers.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-containers.yaml b/.github/workflows/release-containers.yaml index c3266fa5a..52dd69e1e 100644 --- a/.github/workflows/release-containers.yaml +++ b/.github/workflows/release-containers.yaml @@ -45,9 +45,12 @@ jobs: - name: Build version and tags id: versions + env: + GH_REF: ${{ github.ref }} + GH_REPO: ${{ github.repository }} run: | # Strip git ref prefix from version - V_VERSION=$(echo "${{ github.ref }}" | sed -e 's|.*/\(.*\)|\1|') + V_VERSION=$(echo "$GH_REF" | sed -e 's|.*/\(.*\)|\1|') # Strip `v` prefix from version BARE_VERSION=$(echo "$V_VERSION" | sed -e 's|^v/\(.*\)|\1|') @@ -56,7 +59,7 @@ jobs: PLATFORM_VERSION=$BARE_VERSION-${{ matrix.base-image }} # Build container tag - TAG=$REGISTRY/${{ github.repository }}:$PLATFORM_VERSION + TAG=$REGISTRY/$GH_REPO:$PLATFORM_VERSION echo "v_version=$V_VERSION" >> $GITHUB_OUTPUT echo "bare_version=$BARE_VERSION" >> $GITHUB_OUTPUT @@ -64,9 +67,11 @@ jobs: echo "container_tag=$TAG" >> $GITHUB_OUTPUT - name: Download Glistix archive from GitHub release + env: + GH_REPO: ${{ github.repository }} run: | VERSION=${{ steps.versions.outputs.v_version }} - URL=https://github.com/${{ github.repository }}/releases/download/$VERSION/glistix-$VERSION-x86_64-unknown-linux-musl.tar.gz + URL=https://github.com/$GH_REPO/releases/download/$VERSION/glistix-$VERSION-x86_64-unknown-linux-musl.tar.gz echo Downloading $URL curl -Lo glistix.tar.gz $URL