Skip to content

Commit

Permalink
Remove reusable workflow since it costs too much time to implement
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikthepixel committed Nov 26, 2023
1 parent 8b2eeec commit ebaf31c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 52 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/build-to-azure.yml

This file was deleted.

25 changes: 18 additions & 7 deletions .github/workflows/cd-accounts-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ on:
# paths:
# - "apps/accounts/**/*"

env:
APP: accounts

jobs:
build-and-push:
uses: ./.github/workflows/build-to-azure.yml
secrets:
creds: ${{ secrets.AZURE_CREDENTIALS }}
with:
app: accounts
project_name: ${{ env.AZURE_PROJECT_NAME }}
registry: ${{ env.AZURE_CONTAINER_REGISTRY }}
runs-on: ubuntu-latest
steps:
- name: Azure Login
uses: azure/login
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Build image on ACR
uses: azure/CLI
with:
azcliversion: 2.29.1
inlineScript: |
cd ./apps/${{ env.APP }}
az configure --defaults acr=${{ env.AZURE_CONTAINER_REGISTRY }}
az acr build ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.AZURE_PROJECT_NAME }}-${{ env.APP }}:latest
25 changes: 18 additions & 7 deletions .github/workflows/cd-gateway-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ on:
# paths:
# - "apps/gateway/**/*"

env:
APP: gateway

jobs:
build-and-push:
uses: ./.github/workflows/build-to-azure.yml
secrets:
creds: ${{ secrets.AZURE_CREDENTIALS }}
with:
app: accounts
project_name: ${{ env.AZURE_PROJECT_NAME }}
registry: ${{ env.AZURE_CONTAINER_REGISTRY }}
runs-on: ubuntu-latest
steps:
- name: Azure Login
uses: azure/login
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Build image on ACR
uses: azure/CLI
with:
azcliversion: 2.29.1
inlineScript: |
cd ./apps/${{ env.APP }}
az configure --defaults acr=${{ env.AZURE_CONTAINER_REGISTRY }}
az acr build ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.AZURE_PROJECT_NAME }}-${{ env.APP }}:latest

0 comments on commit ebaf31c

Please sign in to comment.