Skip to content

Commit

Permalink
Merge pull request #11 from Azure-Samples/fix-broken-container-build
Browse files Browse the repository at this point in the history
Update container build context and file
  • Loading branch information
seesharprun authored Oct 11, 2023
2 parents 04180ae + 7d5a9b1 commit 02014fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
schedule:
- cron: '0 0 * * 2'
workflow_dispatch:
pull_request:
push:
branches:
- main
Expand All @@ -11,7 +12,7 @@ env:
IMAGE_NAME: ${{ github.repository }}
jobs:
deploy-container:
name: Build and push Docker container image
name: Build Docker container image
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -21,6 +22,7 @@ jobs:
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -30,10 +32,12 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push container image
uses: docker/build-push-action@v5
- name: Build container image
uses: docker/build-push-action@v5
with:
context: ./src/web
push: true
context: ./src/
file: ./src/web/Dockerfile
load: ${{ github.event_name == 'pull_request' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.extract-metadata.outputs.tags }}
labels: ${{ steps.extract-metadata.outputs.labels }}

0 comments on commit 02014fd

Please sign in to comment.