Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration variables to be set during deployment #18

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following inputs can be used as `step.with` keys

- `private_registry_username` - the username for the private registry to pull a docker image from
- `private_registry_password` - the password for the private registry to pull a docker image from
- `config_variables` - a space separated list of key=value pairs to set as config variables on the app during deployment

## Outputs

Expand All @@ -51,6 +52,7 @@ jobs:
docker_img: <docker image name>
private_registry_username: ${{ secrets.DOCKERHUB_USERNAME }}
private_registry_password: ${{ secrets.DOCKERHUB_TOKEN }}
config_variables: KEY1=value1 KEY2=value2
```

## Example with Container Build and Docker Hub
Expand Down Expand Up @@ -99,4 +101,5 @@ jobs:
docker_img: ${{ env.IMAGE_NAME }}
private_registry_username: ${{ secrets.DOCKERHUB_USERNAME }}
private_registry_password: ${{ secrets.DOCKERHUB_TOKEN }}
config_variables: RELEASE_SHA=${{ github.sha }}
```
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ inputs:
private_registry_password:
description: 'Private Registry Password'
required: False
config_variables:
description: 'Configuration variables to set on deploy'
required: False
outputs:
status:
description: "The Success/Failure of the action"
Expand Down
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ aptible deploy --environment "$INPUT_ENVIRONMENT" \
--app "$INPUT_APP" \
--docker-image "$INPUT_DOCKER_IMG" \
--private-registry-username "$INPUT_PRIVATE_REGISTRY_USERNAME" \
--private-registry-password "$INPUT_PRIVATE_REGISTRY_PASSWORD"
--private-registry-password "$INPUT_PRIVATE_REGISTRY_PASSWORD" \
${INPUT_CONFIG_VARIABLES}