Skip to content

Commit

Permalink
update release-containers.yaml workflow
Browse files Browse the repository at this point in the history
- use env vars
  • Loading branch information
PgBiel committed Apr 26, 2024
1 parent c6cf97f commit 13bff20
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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|')
Expand All @@ -56,17 +59,19 @@ 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
echo "platform_version=$PLATFORM_VERSION" >> $GITHUB_OUTPUT
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
Expand Down

0 comments on commit 13bff20

Please sign in to comment.