Skip to content

Commit

Permalink
feat: v1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaironalves committed Apr 5, 2024
1 parent 3e247ef commit 04d4d9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- 5001:5000

env:
TEST_TAG: localhost:5001/actions/hello-world-docer-action:latest
TEST_TAG: localhost:5001/actions/yq-yaml-parser-action:latest

steps:
- name: Checkout
Expand All @@ -51,9 +51,11 @@ jobs:
id: run
env:
INPUT_WHO_TO_GREET: Mona Lisa Octocat
INPUT_YAML_FILE_PATH: ./yq-test.yml
run: |
docker run \
--env INPUT_WHO_TO_GREET="${{ env.INPUT_WHO_TO_GREET }}" \
--env INPUT_YAML_FILE_PATH="${{ env.INPUT_YAML_FILE_PATH }}" \
--rm ${{ env.TEST_TAG }}
test-action:
Expand Down
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ outputs:
runs:
using: docker
image: Dockerfile
args:
- '${{ inputs.file-path }}'
#args:
# - '${{ inputs.file-path }}'
env:
INPUT_WHO_TO_GREET: ${{ inputs.who-to-greet }}
INPUT_YAML_FILE_PATH: '${{ inputs.file-path }}'
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e
# Read the file using yq
yq -o p --properties-separator ':' '... comments = ""' "$1"

_properties=$(_yaml_to_properties "$1")
_properties=$(_yaml_to_properties "$INPUT_YAML_FILE_PATH")
_parsed_properties=$(_replace_dots "$properties" "_")

# Use INPUT_<INPUT_NAME> to get the value of an input
Expand Down

0 comments on commit 04d4d9b

Please sign in to comment.