Skip to content

switch to building docker image and publishing to ghcr #5

switch to building docker image and publishing to ghcr

switch to building docker image and publishing to ghcr #5

name: Build and Deploy to dev service app
on:
push:
branches:
- elr/gh-action-dev-deploy
env:

Check failure on line 8 in .github/workflows/build_and_deploy_dev.yml

View workflow run for this annotation

GitHub Actions / Build and Deploy to dev service app

Invalid workflow file

The workflow is not valid. .github/workflows/build_and_deploy_dev.yml (Line: 8, Col: 5): Unexpected value ''
# AZURE_WEBAPP_NAME: clearlydefined-api-dev
# # AZURE_WEBAPP_PACKAGE_PATH: '.' # TODO: confirm that root is the webapp root (default is root)
# NODE_VERSION: '18' # TODO: does this need to have a minor version?
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log into ghcr registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }} # GitHub username of person launching the action
password: ${{ secrets.GITHUB_TOKEN }} # 24-hour token starting from the time the job is run
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
dockerfile: DevDockerfile
repository: ${{ github.repository }}
image: ${{ github.repository }}-dev
tags: latest ${{ github.sha }}
# - name: 'Deploy to Azure WebApp'
# uses: azure/webapps-deploy@v2
# with:
# app-name: ${{ env.AZURE_WEBAPP_NAME }}
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# # package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} # TODO: uncomment if determined that root is not the webapp root