Skip to content

edit: home component #15

edit: home component

edit: home component #15

# 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.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Build and deploy a container to an Azure Web App
env:
AZURE_WEBAPP_NAME: demo-docker-app-clue # set this to your application's name
on:
push:
branches:
- main
permissions:
contents: "read"
packages: "write"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v2
- name: "Log in to GitHub container registry"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push container image to registry
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/clue355/azure_pipeline:dev
file: ./Dockerfile.dev
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: "Login via Azure CLI"
uses: Azure/login@v1.6.1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: Azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: "ghcr.io/clue355/azure_pipeline:dev"