diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..46f601f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +.direnv +.envrc +.idea diff --git a/Dockerfile.action b/Dockerfile.action new file mode 100644 index 0000000..65f4ead --- /dev/null +++ b/Dockerfile.action @@ -0,0 +1,10 @@ +FROM python:3.8.5 + +COPY requirements.txt / +RUN pip install --upgrade pip &&\ + pip install --use-feature=2020-resolver -r /requirements.txt + +COPY safecast_deploy /safecast_deploy +COPY deploy.py / +COPY action.sh / +ENTRYPOINT ["bash", "/action.sh"] diff --git a/action.sh b/action.sh new file mode 100644 index 0000000..2bae5a3 --- /dev/null +++ b/action.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +exec ./deploy.py "${INPUT_MODE}" "${INPUT_APP}" "${INPUT_ENV}" "${INPUT_VERSION}" + diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..1938656 --- /dev/null +++ b/action.yml @@ -0,0 +1,20 @@ +name: "Safecast Deploy" +description: "Handles deployment operations for safecast environments" +inputs: + mode: + description: "Deploy mode (same_env,new_env)" + required: true + default: same_env + app: + description: 'Application: {api,ingest,reporting}' + required: true + env: + description: 'Env: {dev,prd}' + required: true + version: + description: 'App version' + required: true + +runs: + using: 'docker' + image: 'docker://safecast/github-actions-safecast-deploy:v1'