Releasing the container application to AKS
Now, it is time to release our application to the production environment in AKS.
Getting ready…
Open the file .github/workflows/publish.yml
.
How to do it…
- Add two more environment variables to the top of the workflow:
env: REGISTRY: 'ghcr.io' IMAGE_NAME: '${{ github.repository }}' APP_NAME: 'release-recipe-app' SERVICE_NAME: 'release-recipe-service'
Add an output to the job
build-and-push-image
from the previous recipe so that the new job will be able to access the image name:outputs: image_tag: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
- Add a second job called
production
to the workflow, which only runs on pushes tomain
and is associated with the production environment. Set the URL of the environment to the output of a step we’ll add later. The job will need the permissionsid-token: write
andcontent...