Skip to content

Commit

Permalink
Deploy input image...
Browse files Browse the repository at this point in the history
  • Loading branch information
filipopo committed Dec 17, 2024
1 parent 4869df8 commit c155823
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
type: string

env:
DOCKER_IMAGE: filipmania/urlshortener:${{ github.event.inputs.image_tag }}
TF_TOKEN_app_terraform_io: ${{ secrets.TERRAFORM_TOKEN }}
SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down Expand Up @@ -80,4 +81,4 @@ jobs:
working-directory: cdktf.out/stacks/urlshortener-stack

- name: Upload static files
run: sh swa.sh ${{ github.event.inputs.image_tag }}
run: sh swa.sh
6 changes: 3 additions & 3 deletions cdktf/swa.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

TAG=${1:-latest}
docker pull filipmania/urlshortener:$TAG
DOCKER_IMAGE=${DOCKER_IMAGE:-filipmania/urlshortener:latest}
docker pull $DOCKER_IMAGE

docker create --name url-temp filipmania/urlshortener:$TAG
docker create --name url-temp $DOCKER_IMAGE
docker cp url-temp:/opt/prod_static ./prod_static
docker rm url-temp

Expand Down

0 comments on commit c155823

Please sign in to comment.