From 2bed97b7678ec3ab1dc7f44baa7dd580c5a8cd88 Mon Sep 17 00:00:00 2001 From: Nikolas Zimmermann Date: Thu, 21 Nov 2024 21:33:22 +0100 Subject: [PATCH] Fix setting environment vars in GitHub workflow. (#80) GITHUB_ENV needs to be used to set environment variables, not GITHUB_OUTPUT. The key/value pairs are also propagated to the following steps, so it works. --- .github/workflows/wkdev-sdk.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wkdev-sdk.yml b/.github/workflows/wkdev-sdk.yml index 1815d5a..9ef23ac 100644 --- a/.github/workflows/wkdev-sdk.yml +++ b/.github/workflows/wkdev-sdk.yml @@ -16,9 +16,9 @@ jobs: - name: Set tag name run: | if [ "${GITHUB_BASE_REF}" = 'main' ]; then - echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_OUTPUT}" + echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" fi - echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=${GITHUB_REPOSITORY_OWNER}" >> "${GITHUB_OUTPUT}" + echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}" - name: Install podman run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs @@ -63,9 +63,9 @@ jobs: - name: Set tag name run: | if [ "${GITHUB_BASE_REF}" = 'main' ]; then - echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_OUTPUT}" + echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" fi - echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=${GITHUB_REPOSITORY_OWNER}" >> "${GITHUB_OUTPUT}" + echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}" - name: Install podman run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs