mirror of
https://github.com/ditkrg/build-image-workflow.git
synced 2026-01-22 23:27:06 +00:00
Refactor tag extraction in action.yml
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
66b6967fe6
commit
4d6653c493
17
action.yml
17
action.yml
@ -80,21 +80,8 @@ runs:
|
|||||||
id: set_tag
|
id: set_tag
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Define an array of strings
|
extracted_element=$(echo "$json" | jq -r '.tags | .[0]')
|
||||||
# my_array=reg.dev.krd/dms/client:dev-cb54d82
|
echo "extracted_element: $extracted_element"
|
||||||
# reg.dev.krd/dms/client:dev
|
|
||||||
# reg.dev.krd/dms/client:dev-cache
|
|
||||||
|
|
||||||
# # Specify the index you want to extract
|
|
||||||
# index_to_extract=0
|
|
||||||
|
|
||||||
# # Extract the element at the specified index
|
|
||||||
# extracted_element="${my_array[$index_to_extract]}"
|
|
||||||
|
|
||||||
# echo "Extracted element: $extracted_element"
|
|
||||||
jsonOutput=$(echo "$json" | jq -r '.tags')
|
|
||||||
echo "jsonOutput: ${jsonOutput}"
|
|
||||||
echo "jsonOutput: ${jsonOutput[0]}"
|
|
||||||
|
|
||||||
echo "tag=$extracted_element" >> $GITHUB_OUTPUT
|
echo "tag=$extracted_element" >> $GITHUB_OUTPUT
|
||||||
env:
|
env:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user