Skip to content

Commit

Permalink
Merge pull request #7 from stack-spot/feat/localexec-input
Browse files Browse the repository at this point in the history
add new input to allow local-exec in selfhosted
  • Loading branch information
ladylokizup authored Mar 1, 2024
2 parents d2a1089 + 51674dd commit 6019eb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
CONTAINER_URL: my/container-url # not mandatory
FEATURES_TERRAFORM_MODULES: ... # not mandatory
PATH_TO_MOUNT: path/to/mount
RELEASE_LOCALEXEC: true # not mandatory
```
* * *
Expand All @@ -65,6 +66,7 @@ Field | Mandatory | Observation
**CONTAINER_URL** | NO | Container url reference (e.g `stackspot/image`)
**FEATURES_TERRAFORM_MODULES** | NO | List of external terraform modules allowed
**PATH_TO_MOUNT** | YES | Path provided to be used as a volume within the docker image that will be used with terraform
**RELEASE_LOCALEXEC** | NO | whether or not terraform will be enable to perform local exec operations or not (default: `false`)

* * *

Expand Down
6 changes: 6 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ inputs:
description: "Path to mount inside the docker"
required: true
default: ${{ github.workspace }}
RELEASE_LOCALEXEC:
description: "If Runtimes will allow execution of the local-exec command within terraform"
required: false
default: false

runs:
using: "composite"
Expand Down Expand Up @@ -83,6 +87,7 @@ runs:
-e AWS_SESSION_TOKEN=${{ inputs.AWS_SESSION_TOKEN }} \
-e AWS_REGION=${{ inputs.AWS_REGION }} \
-e FEATURES_TERRAFORM_MODULES='${{ inputs.FEATURES_TERRAFORM_MODULES }}' \
-e FEATURES_RELEASE_LOCALEXEC=${{ inputs.RELEASE_LOCALEXEC }} \
--entrypoint=/app/stackspot-runtime-job-destroy \
${{ inputs.CONTAINER_URL }}:latest start --run-task-id="${{ inputs.RUN_TASK_ID }}"
shell: bash
Expand All @@ -108,6 +113,7 @@ runs:
-e AWS_SESSION_TOKEN=${{ steps.aws-cred.outputs.aws-session-token }} \
-e AWS_REGION=${{ inputs.AWS_REGION }} \
-e FEATURES_TERRAFORM_MODULES='${{ inputs.FEATURES_TERRAFORM_MODULES }}' \
-e FEATURES_RELEASE_LOCALEXEC=${{ inputs.RELEASE_LOCALEXEC }} \
--entrypoint=/app/stackspot-runtime-job-destroy \
${{ inputs.CONTAINER_URL }}:latest start --run-task-id="${{ inputs.RUN_TASK_ID }}"
shell: bash
Expand Down

0 comments on commit 6019eb6

Please sign in to comment.