From a9184acd23ec1c47aa7db1682d56319ba09332b3 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Fri, 7 Nov 2025 21:40:17 +1030 Subject: [PATCH] Shell to lowercase --- .gitea/workflows/build-and-push.yaml | 12 +++++++++--- .gitea/workflows/ci.yaml | 14 ++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index 2aa9efa..da3a3aa 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -16,9 +16,15 @@ jobs: steps: - name: Convert to lowercase id: github_repository_to_lowercase - uses: step-security/change-string-case-action@v6 - with: - inputStr: ${{ github.repository }} # Replace with your variable + run: | + # Grab the value (you can also use `${{ github.ref }}`, `${{ secrets.MY_SECRET }}`, etc.) + raw_value="${{ env.MY_VAR }}" + # Convert to lower case + lower_value=$(echo "$raw_value" | tr '[:upper:]' '[:lower:]') + # Export it to the workflow environment + # echo "MY_LOWER=$lower_value" >> $GITHUB_ENV + # If you want to use it as an output of this step: + echo "lowercase=$lower_value" >> $GITHUB_OUTPUT # ------------------------------------------------------------------ # 1. Checkout repository # ------------------------------------------------------------------ diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 2a5bfbb..cfe39ba 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -11,12 +11,18 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Convert to lowercase id: github_repository_to_lowercase - uses: step-security/change-string-case-action@v6 - with: - inputStr: ${{ github.repository }} # Replace with your variable + run: | + # Grab the value (you can also use `${{ github.ref }}`, `${{ secrets.MY_SECRET }}`, etc.) + raw_value="${{ env.MY_VAR }}" + # Convert to lower case + lower_value=$(echo "$raw_value" | tr '[:upper:]' '[:lower:]') + # Export it to the workflow environment + # echo "MY_LOWER=$lower_value" >> $GITHUB_ENV + # If you want to use it as an output of this step: + echo "lowercase=$lower_value" >> $GITHUB_OUTPUT - name: Build image id: build