Skip to content

Commit

Permalink
Prepared Action
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoCuryZup committed Feb 23, 2024
1 parent 8af648e commit 033988e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ inputs:
CONTAINER_URL:
description: "IAC Container url"
default: stackspot/runtime-job-iac
HOOK_ENV_VARS:
description: |
Hook Environment Variables, use it like a .env file
VAR_ONE=1
VAR_TWO=2
required: false
default: ""

runs:
using: "composite"
Expand All @@ -45,6 +52,12 @@ runs:
run: echo 🤖 OS runner is $(uname)
shell: bash

- name: Creating Env File
if: ${{ inputs.HOOK_ENV_VARS != '' }}
shell: bash
run: |
echo ${{ inputs.HOOK_ENV_VARS }} >> hook.env
- name: Configure aws credentials
id: aws-cred
if: ${{ inputs.AWS_ROLE_ARN != 0 }}
Expand All @@ -69,6 +82,7 @@ runs:
-e AWS_SESSION_TOKEN=${{ inputs.AWS_SESSION_TOKEN }} \
-e AWS_REGION=${{ inputs.AWS_REGION }} \
--entrypoint=/app/stackspot-runtime-job-iac \
--env-file ./hook.env \
${{ inputs.CONTAINER_URL }}:latest start --run-task-id="${{ inputs.RUN_TASK_ID }}" --base-path-output="${{ inputs.BASE_PATH_OUTPUT }}"
shell: bash

Expand All @@ -87,6 +101,7 @@ runs:
-e AWS_SESSION_TOKEN=${{ steps.aws-cred.outputs.aws-session-token }} \
-e AWS_REGION=${{ inputs.AWS_REGION }} \
--entrypoint=/app/stackspot-runtime-job-iac \
--env-file ./hook.env \
${{ inputs.CONTAINER_URL }}:latest start --run-task-id="${{ inputs.RUN_TASK_ID }}" --base-path-output="${{ inputs.BASE_PATH_OUTPUT }}"
shell: bash

Expand Down

0 comments on commit 033988e

Please sign in to comment.