Skip to content

Commit

Permalink
this time?
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridge committed Oct 13, 2023
1 parent 3bd81d2 commit 444414e
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,41 +54,48 @@ jobs:
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_BACKEND_SE }} # Define secret variable in repository settings as per action documentation
package: 'backend/Api/build'

push:
build-frontend:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build frontend --tag vibes-frontend --label "runnumber=${GITHUB_RUN_ID}"
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0

- name: Log in to GitHub container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Lowercase the repo name and username
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Build and push container image to registry
uses: docker/build-push-action@v4
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
push: true
tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}
file: ./Dockerfile

deploy:
deploy-frontend:
permissions:
contents: none
runs-on: ubuntu-latest

needs: push

needs: build-frontend
environment:
name: 'production'
name: 'Development'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Lowercase the repo name
- name: Lowercase the repo name and username
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
uses: azure/webapps-deploy@v2
with:
app-name: frontend-docker-test-2
publish-profile: ${{ secrets.TMP_DOCKER_PUSH }}
Expand Down

0 comments on commit 444414e

Please sign in to comment.