Create build-production.yml #2
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
# This is a basic workflow to help you get started with Actions | |
name: Build and push the latest build to staging | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build_push_image: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Docker Login | |
uses: docker/login-action@v3.0.0 | |
with: | |
registry: ${{ secrets.ACR_NAME }} | |
username: ${{ secrets.ACR_LOGIN }} | |
password: ${{ secrets.ACR_PASSWORD }} | |
- name: Build and push staging images | |
uses: docker/build-push-action@v5.0.0 | |
with: | |
context: . | |
push: true | |
tags: ${{secrets.ACR_NAME}}/contoso-website:latest |