mirror of
https://github.com/ditkrg/build-image-workflow.git
synced 2026-01-22 20:36:46 +00:00
Refactor set_tag step in action.yml
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
41b517b4ef
commit
8b912d0b2c
15
action.yml
15
action.yml
@ -79,4 +79,17 @@ runs:
|
||||
- name: Set Tag
|
||||
id: set_tag
|
||||
shell: bash
|
||||
run: echo "tag=${{ steps.meta.outputs.tags[0] }}" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
# Define an array of strings
|
||||
my_array=${{ steps.meta.outputs.tags }}
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
echo "tag=${{ steps.meta.outputs.tags[0] }}" >> $GITHUB_OUTPUT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user