This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Merge remote-tracking branch 'origin/main' #36
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
name: If push to the main, deploy it | |
on: | |
push: | |
branches: | |
- main | |
# paths: | |
# - "canbus-server/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Make Env File | |
run: | | |
touch canbus-server/.env | |
echo "${{ secrets.ENV_FILE }}" >> canbus-server/.env | |
- name: Log in to Azure | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Build and deploy Container App | |
uses: azure/container-apps-deploy-action@v0 | |
with: | |
appSourcePath: ${{ github.workspace }}/canbus-server | |
acrName: woowasiblings | |
acrUsername: ${{ secrets.ACR_USERNAME }} | |
acrPassword: ${{ secrets.ACR_PASSWORD }} | |
containerAppName: canbus-server | |
containerAppEnvironment: canbus-server-env | |
resourceGroup: rg-2024-Woowa-Siblings | |
imageToBuild: woowasiblings.azurecr.io/canbus-server:${{ github.sha }} | |
dockerfilePath: Dockerfile | |
# - name: Azure Container Apps Ingress Setting | |
# run: az containerapp ingress update --name canbus-server --resource-group rg-2024-Woowa-Siblings --target-port 8080 --allow-insecure |