Skip to content

Create build-production.yml #2

Create build-production.yml

Create build-production.yml #2

Workflow file for this run

# 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