Skip to content

Update build-and-push.yml #4

Update build-and-push.yml

Update build-and-push.yml #4

name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
run: echo ${{secrets.CR_PAT}} | docker login ghcr.io -u ldraney --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/ldraney/az-trial-app:latest
ghcr.io/ldraney/az-trial-app:${{ github.sha }}
- name: Log out from GitHub Container Registry
run: docker logout ghcr.io