Skip to content

Commit

Permalink
Merge pull request #47 from khaneliman/develop
Browse files Browse the repository at this point in the history
Only build Docker WebApp on successful build and release publish
  • Loading branch information
khaneliman authored Nov 8, 2021
2 parents 609a458 + 5c51674 commit f69ea24
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
name: Docker WebApp

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
workflow_run:
workflows: [".NET WebApp Build"]
types: [completed]
branches: [ develop, master ]
# Publish semver tags as releases.
tags: [ 'v*.*.*', 'latest' ]
release:
types: [published]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
PRIVATE_REGISTRY: khaneliman.azurecr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}-webapp


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name = 'release'}}
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -63,9 +55,13 @@ jobs:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.PRIVATE_REGISTRY }}/${{ env.IMAGE_NAME }}
# GitHub Action to install QEMU static binaries.
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/[email protected]

# GitHub Action to set up Docker Buildx.
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/[email protected]

Expand Down

0 comments on commit f69ea24

Please sign in to comment.