File tree Expand file tree Collapse file tree 3 files changed +59
-2
lines changed Expand file tree Collapse file tree 3 files changed +59
-2
lines changed Original file line number Diff line number Diff line change 1+ name : time-tracker-ui-cd-stage
2+
3+ on :
4+ push :
5+ branches :
6+ - ' fix-workflow'
7+
8+ jobs :
9+ cd :
10+ runs-on : ubuntu-latest
11+ env :
12+ TF_WORKSPACE : stage
13+ AWS_ACCESS_KEY_ID : ${{secrets.AWS_ACCESS_KEY_ID}}
14+ AWS_SECRET_ACCESS_KEY : ${{secrets.AWS_SECRET_ACCESS_KEY}}
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v3
19+
20+ - name : Get the release_version
21+ run : |
22+ echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
23+ echo $RELEASE_VERSION
24+
25+
26+ - name : Unlock STAGE secrets
27+ 28+ env :
29+ GIT_CRYPT_KEY : ${{ secrets.GIT_CRYPT_KEY_STAGE }}
30+
31+ - name : Build the docker image
32+ run : |-
33+ docker build \
34+ --target production -t timetracker_ui -f Dockerfile_stage \
35+ .
36+
37+ - name : Publish docker image to stage azure container registry
38+ run : |
39+ make login publish image_tag=$RELEASE_VERSION
40+
41+ # - name: Setup terraform
42+ # uses: hashicorp/setup-terraform@v1
43+ # with:
44+ # terraform_version: 1.1.9
45+
46+ # - name: Authenticate with the TF modules repository
47+ # uses: webfactory/[email protected] 48+ # with:
49+ # ssh-private-key: ${{ secrets.INFRA_TERRAFORM_MODULES_SSH_PRIV_KEY }}
50+
51+ # - name: Terraform Init
52+ # working-directory: ${{ env.WORKING_DIR }}
53+ # run: terraform init
54+
55+ # - name: Terraform Apply
56+ # working-directory: ${{ env.WORKING_DIR }}
57+ # run: terraform apply -var-file="${{ env.TF_WORKSPACE }}.tfvars" -var "image_tag=$RELEASE_VERSION" -auto-approve
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ remove_prod: ## Delete container timetracker_ui_prod.
8181
8282.PHONY : publish_prod
8383publish_prod : # # Upload a docker image to the prod azure container registry acr=<name_of_the_azure_container_registry> image_tag=<tag_for_the_image>
84- docker tag timetracker_ui_prod:latest $( acr ) .azurecr.io/timetracker_ui :$(image_tag )
85- docker push $( acr ) .azurecr.io/timetracker_ui :$(image_tag )
84+ docker tag timetracker_ui_prod:latest 568748651446.dkr.ecr.us-east-1.amazonaws.com/time-tracker/stage-ui :$(image_tag )
85+ docker push 568748651446.dkr.ecr.us-east-1.amazonaws.com/time-tracker/stage-ui :$(image_tag )
8686
8787.PHONY : login
8888login : # # Login in respository of docker images
You can’t perform that action at this time.
0 commit comments