Shell to lowercase
This commit is contained in:
@@ -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
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user