From a7f3ebfd838f33c24ad71f7b282464fe3ac5ab10 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Thu, 10 Apr 2025 14:45:07 -0500 Subject: [PATCH] Refactor output variable assignments in CI and release workflows for consistency --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/release.yml | 11 +++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e75d91b..612c8b86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,8 +36,8 @@ jobs: run: | VERSION=$(python -c "import version; print(version.__version__)") BUILD=$(python -c "import version; print(version.__build__)") - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "build=$BUILD" >> $GITHUB_OUTPUT + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "build=${BUILD}" >> $GITHUB_OUTPUT echo "sha_short=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT - name: Set repository and image metadata @@ -45,11 +45,11 @@ jobs: run: | # Get lowercase repository owner REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]') - echo "repo_owner=$REPO_OWNER" >> $GITHUB_OUTPUT + echo "repo_owner=${REPO_OWNER}" >> $GITHUB_OUTPUT # Get repository name REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]') - echo "repo_name=$REPO_NAME" >> $GITHUB_OUTPUT + echo "repo_name=${REPO_NAME}" >> $GITHUB_OUTPUT # Determine branch name if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then @@ -61,7 +61,7 @@ jobs: else # For other branches, use the branch name BRANCH=$(echo "${{ github.ref }}" | sed 's/refs\/heads\///' | sed 's/[^a-zA-Z0-9]/-/g') - echo "branch_tag=$BRANCH" >> $GITHUB_OUTPUT + echo "branch_tag=${BRANCH}" >> $GITHUB_OUTPUT echo "is_main=false" >> $GITHUB_OUTPUT fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 829f4a38..db384065 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,13 +36,13 @@ jobs: run: | python scripts/bump_version.py ${{ github.event.inputs.version_type }} NEW_VERSION=$(python -c "import version; print(f'{version.__version__}')") - echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT + echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT - name: Set lowercase repo owner id: repo_owner run: | REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]') - echo "lowercase=$REPO_OWNER" >> $GITHUB_OUTPUT + echo "lowercase=${REPO_OWNER}" >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -79,11 +79,10 @@ jobs: file: ./docker/Dockerfile - name: Create GitHub Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: tag_name: v${{ steps.update_version.outputs.new_version }} - release_name: Release v${{ steps.update_version.outputs.new_version }} + name: Release v${{ steps.update_version.outputs.new_version }} draft: false prerelease: false + token: ${{ secrets.GITHUB_TOKEN }}