Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybravo authored Jun 22, 2024
1 parent 6e47032 commit 2f7c777
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
name: Build and Push to ACR
on:
push:
branches:
- 'main'
name: Build and Push to ACR

jobs:
build:
name: 'Build and Push to ACR'
build-and-push:
runs-on: ubuntu-latest

defaults:
run:
shell: bash

steps:
- name: Checkout
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4

- name: Docker Login
- name: 'Build and push image'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.AZURE_URL }}
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Build and Push to ACR
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.IMAGE_TAG }}
file: Dockerfile
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }}
docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest

0 comments on commit 2f7c777

Please sign in to comment.