Skip to content

Commit

Permalink
Fix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkma committed Apr 29, 2024
1 parent ab7ad63 commit 2134cdd
Showing 1 changed file with 55 additions and 10 deletions.
65 changes: 55 additions & 10 deletions .github/workflows/run-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,17 @@ jobs:
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }}
imageToBuild: ${{ env.TEST_FULL_ACR_NAME }}/${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}
postgres: |
dms-db
dms-db2
kafka: kaf1,kaf2

- name: Delete created Azure Container App
if: ${{ always() }}
shell: bash
run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -y

- name: Delete pushed image
if: ${{ always() }}
shell: bash
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y


create-using-builder-and-internal-registry:

name: 'Create app using builder and push to internal registry'
Expand Down Expand Up @@ -108,7 +103,6 @@ jobs:
shell: bash
run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} -y


create-using-found-dockerfile:

name: 'Create app using found Dockerfile'
Expand Down Expand Up @@ -210,7 +204,6 @@ jobs:
shell: bash
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y


create-using-image-linux:

name: 'Create app using image on Linux runner'
Expand Down Expand Up @@ -332,7 +325,6 @@ jobs:
shell: bash
run: az monitor log-analytics workspace delete -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.WORKSPACE_NAME }} -y


create-using-builder-yaml:

name: 'Create app using builder with YAML configuration'
Expand Down Expand Up @@ -629,4 +621,57 @@ jobs:
yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }}
containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }}
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}

create-using-builder-with-add-on:

name: 'Create app using builder'
runs-on: ubuntu-latest
timeout-minutes: 10

env:
TEST_IMAGE_TAG: 'bs-${{ github.run_id }}'
TEST_CONTAINER_APP_NAME: 'gh-ca-bs-${{ github.run_id }}'

steps:
- name: Checkout action repository
uses: actions/checkout@v3

- name: Clone Oryx repository
uses: actions/checkout@v3
with:
repository: microsoft/Oryx
path: oryx

- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.TEST_AZURE_CREDENTIALS }}

- name: Execute Azure Container Apps Build and Deploy Action
uses: ./
with:
appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/NetCore6PreviewWebApp'
acrName: ${{ vars.TEST_ACR_NAME }}
acrUsername: ${{ secrets.TEST_REGISTRY_USERNAME }}
acrPassword: ${{ secrets.TEST_REGISTRY_PASSWORD }}
containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }}
containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }}
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }}
imageToBuild: ${{ env.TEST_FULL_ACR_NAME }}/${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}
postgres: |
dms-db
dms-db2
kafka: kaf1,kaf2
redis: redis

- name: Delete created Azure Container App
if: ${{ always() }}
shell: bash
run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -y

- name: Delete pushed image
if: ${{ always() }}
shell: bash
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y

0 comments on commit 2134cdd

Please sign in to comment.