Skip to content

Instantly share code, notes, and snippets.

@pierew
Last active September 18, 2021 19:58
Show Gist options
  • Save pierew/b98526cdf532266dffa3c0c5d2e50e2d to your computer and use it in GitHub Desktop.
Save pierew/b98526cdf532266dffa3c0c5d2e50e2d to your computer and use it in GitHub Desktop.
GitHub Actions - Docker Image and Publish to Azure App Service
name: Azure App Service CD
on:
workflow_dispatch:
registry_package:
types:
- updated
- published
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: Trigger Webhook for CD on Azure App Service
run: curl https://\${{ secrets.AZURE_APP_SERVICE_WEBHOOK }}@intelligencefeeds.scm.azurewebsites.net/docker/hook -H "" -d ""
name: Docker Image CI
on:
push:
branches:
- master
pull_request:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_PACKAGE_TOKEN }}
- name: Build Image
run: docker build -t ghcr.io/${{ github.repository }}:latest .
- name: Push Image
run: docker push ghcr.io/${{ github.repository }}:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment