test release #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish container image | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish_to_registry: | |
name: Build and push image to registry | |
runs-on: ubuntu-latest | |
env: | |
ICR_NAMESPACE: solution-tutorials | |
ICR_REPOSITORY: tutorial-cloud-e2e-security | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: icr.io | |
username: ${{ secrets.ICR_USER }} | |
password: ${{ secrets.ICR_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: icr.io/${{ env.ICR_NAMESPACE }}/${{ env.ICR_REPOSITORY }} | |
- name: Build and push image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./app | |
file: ./app/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |