-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
288 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.env | ||
.github | ||
.gitattributes | ||
.gitignore | ||
.npmrc | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build and deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
ENVIRONMENT: infrastructure | ||
TIMEZONE: "Europe/London" | ||
REGISTRY_NAME: ${{ vars.REGISTRY_NAME }} | ||
APP_NAME: "app-prototypekit-credit-risk-dev-001" | ||
|
||
jobs: | ||
# 1. Setup deployment variables | ||
setup: | ||
name: Setup 🔧 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
environment: ${{ env.ENVIRONMENT }} | ||
timezone: ${{ env.TIMEZONE }} | ||
steps: | ||
- name: Environment 🧪 | ||
run: echo "Environment set to ${{ env.ENVIRONMENT }}" | ||
|
||
- name: Timezone 🌐 | ||
run: echo "Timezone set to ${{ env.TIMEZONE }}" | ||
|
||
build: | ||
name: Build & Push | ||
needs: setup | ||
environment: ${{ needs.setup.outputs.environment }} | ||
env: | ||
ENVIRONMENT: ${{ needs.setup.outputs.environment }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Repository 🗃️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: https://${{ env.REGISTRY_NAME }}.azurecr.io | ||
username: ${{ secrets.CAPROTOTYPEKITDEV001_REGISTRY_USERNAME }} | ||
password: ${{ secrets.CAPROTOTYPEKITDEV001_REGISTRY_PASSWORD }} | ||
|
||
- name: Build & Push to ACR 📦️ | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY_NAME }}.azurecr.io/prototypekit-credit-risk:latest | ||
file: ./Dockerfile | ||
|
||
- name: Deploy to Azure Web App | ||
id: deploy-to-webapp | ||
uses: azure/webapps-deploy@v2 | ||
with: | ||
app-name: ${{ env.APP_NAME }} | ||
slot-name: "production" | ||
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | ||
images: "${{ env.REGISTRY_NAME }}.azurecr.io/prototypekit-credit-risk:latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Node.js ignores | ||
node_modules/ | ||
|
||
# Prototype ignores - per-user | ||
.tmp/ | ||
.env | ||
migrate.log | ||
usage-data-config.json | ||
|
||
# General ignores | ||
.DS_Store | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.