@@ -22,21 +22,25 @@ jobs:
2222 - name : Docker
2323 run : docker build -t gotime:latest .
2424
25- # Step3 - Run the container then deletes it once the code has ran
25+ # Step3 - Unit Test with tag
26+ - name : Run Docker container (test)
27+ run : docker run --rm gotime:latest
28+
29+ # Step4 - Run the container then deletes it once the code has ran
2630 - name : Run container and capture output
27- run : docker run --rm gotime
31+ run : docker run --rm gotime:latest
2832
29- # Step4 - Authenticates to Google Cloud with the existing JSON key
33+ # Step5 - Authenticates to Google Cloud with the existing JSON key
3034 - name : Authenticate to Google Cloud using serviceaccount
3135 uses : google-github-actions/auth@v3
3236 with :
3337 credentials_json : ' ${{ secrets.GCP_SA_KEY }}'
3438
35- # Step5 - Configures Docker to access my GCP project
39+ # Step6 - Configures Docker to access my GCP project
3640 - name : Configure Docker to access GCP
3741 run : gcloud auth configure-docker us-west1-docker.pkg.dev
3842
39- # Step6 - Tags the container and pushes to the Artifact Repo in my GCP project
43+ # Step7 - Tags the container and pushes to the Artifact Repo in my GCP project
4044 - name : Push to Artifact Registry
4145 run : docker tag gotime:latest us-west1-docker.pkg.dev/juta-0816/go-code/gotime:latest
4246 docker push us-west1-docker.pkg.dev/juta-0816/go-code/gotime:latest
0 commit comments