Skip to content

Commit

Permalink
chore: pass manual flag through in deployment job (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 authored Nov 9, 2023
1 parent 9c159fb commit e041d82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
# For commit deployments, the target is the same as the tag (i.e. the commit hash).
deploy_target="$deploy_tag"
fi
make DEPLOY_ENV="$deploy_env" DEPLOY_TARGET="$deploy_target" DEPLOY_TAG="$deploy_tag" schedule-deployment
make DEPLOY_ENV="$deploy_env" DEPLOY_TARGET="$deploy_target" DEPLOY_TAG="$deploy_tag" MANUAL_DEPLOY="true" schedule-deployment
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ DEPLOY_TARGET ?= latest
# Docker image tag to deploy
DEPLOY_TAG ?= latest

# Whether or not this is a manual deployment
MANUAL_DEPLOY ?= false

.PHONY: all
all: build check-fmt check-clippy test

Expand Down Expand Up @@ -86,4 +89,4 @@ publish-docker:

.PHONY: schedule-deployment
schedule-deployment:
./ci-scripts/deploy.sh "${DEPLOY_ENV}" "${DEPLOY_TARGET}" "${DEPLOY_TAG}"
./ci-scripts/deploy.sh "${DEPLOY_ENV}" "${DEPLOY_TARGET}" "${DEPLOY_TAG}" "${MANUAL_DEPLOY}"
4 changes: 3 additions & 1 deletion ci-scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ttl=$(date +%s -d "14 days")
network="${1-dev}"
target="${2-latest}"
tag="${3-latest}"
manual="${4-false}"

docker run --rm -i \
-e "AWS_REGION=$AWS_REGION" \
Expand All @@ -26,7 +27,8 @@ docker run --rm -i \
\"M\": { \
\"component\": {\"S\": \"rust-ceramic\"}, \
\"sha\": {\"S\": \"$target\"}, \
\"shaTag\": {\"S\": \"$tag\"} \
\"shaTag\": {\"S\": \"$tag\"}, \
\"manual\": {\"BOOL\": $manual} \
} \
} \
}"

0 comments on commit e041d82

Please sign in to comment.