Shell to lowercase
This commit is contained in:
@@ -16,9 +16,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Convert to lowercase
|
- name: Convert to lowercase
|
||||||
id: github_repository_to_lowercase
|
id: github_repository_to_lowercase
|
||||||
uses: step-security/change-string-case-action@v6
|
run: |
|
||||||
with:
|
# Grab the value (you can also use `${{ github.ref }}`, `${{ secrets.MY_SECRET }}`, etc.)
|
||||||
inputStr: ${{ github.repository }} # Replace with your variable
|
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
|
# 1. Checkout repository
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|||||||
@@ -11,12 +11,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Convert to lowercase
|
- name: Convert to lowercase
|
||||||
id: github_repository_to_lowercase
|
id: github_repository_to_lowercase
|
||||||
uses: step-security/change-string-case-action@v6
|
run: |
|
||||||
with:
|
# Grab the value (you can also use `${{ github.ref }}`, `${{ secrets.MY_SECRET }}`, etc.)
|
||||||
inputStr: ${{ github.repository }} # Replace with your variable
|
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
|
- name: Build image
|
||||||
id: build
|
id: build
|
||||||
|
|||||||
Reference in New Issue
Block a user