diff --git a/.github/workflows/run-validation-oidc.yml b/.github/workflows/run-validation-oidc.yml deleted file mode 100644 index cb4151a..0000000 --- a/.github/workflows/run-validation-oidc.yml +++ /dev/null @@ -1,679 +0,0 @@ -name: Run validation on action using OIDC - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - branches: - - main - paths-ignore: - - '**.md' - -env: - TEST_FULL_ACR_NAME: ${{ vars.TEST_ACR_NAME }}.azurecr.io - TEST_IMAGE_REPOSITORY: github-actions/container-app - -jobs: - create-using-builder: - - name: 'Create app using builder' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - 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: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - 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 }} - - - 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' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - 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: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.OIDC_TEST_CLIENT_ID }} - tenant-id: ${{ secrets.OIDC_TEST_TENANT_ID }} - subscription-id: ${{ secrets.OIDC_TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/NetCore6PreviewWebApp' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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_NO_ACR_NAME }} -y - - - create-using-found-dockerfile: - - name: 'Create app using found Dockerfile' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_IMAGE_TAG: 'fd-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'gh-ca-fd-${{ 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: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/Blazor_Function_Sample/blazor-sample-app' - 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 }} - - - 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-provided-dockerfile: - - name: 'Create app using provided Dockerfile' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_IMAGE_TAG: 'pd-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'gh-ca-pd-${{ 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: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/Blazor_Function_Sample/blazor-sample-app' - dockerfilePath: 'Dockerfile' - 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 }} - - - 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-image-linux: - - name: 'Create app using image on Linux runner' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-is-lin-${{ github.run_id }}' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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 - - create-using-image-windows: - - name: 'Create app using image on Windows runner' - runs-on: windows-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-is-win-${{ github.run_id }}' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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 - - create-using-image-new-env: - - name: 'Create app using image with new environment' - runs-on: ubuntu-latest - permissions: - id-token: write # This is required for requesting the OIDC JWT Token - timeout-minutes: 25 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-is-ne-${{ github.run_id }}' - TEST_NEW_CONTAINER_APP_ENV: 'gh-ca-is-ne-${{ github.run_id }}-env' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ env.TEST_NEW_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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: Get customer ID for workspace to delete - if: ${{ always() }} - shell: bash - run: | - CUSTOMER_ID=$(az containerapp env show -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.TEST_NEW_CONTAINER_APP_ENV }} --query 'properties.appLogsConfiguration.logAnalyticsConfiguration.customerId') - echo "CUSTOMER_ID=${CUSTOMER_ID}" >> $GITHUB_ENV - - - name: Get name of workspace to delete - if: ${{ always() }} - shell: bash - run: | - WORKSPACE_NAME=$(az monitor log-analytics workspace list -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} --query '[?customerId == `${{ env.CUSTOMER_ID }}`].name | [0]') - echo "WORKSPACE_NAME=${WORKSPACE_NAME}" >> $GITHUB_ENV - - - name: Delete created Azure Container App environment - if: ${{ always() }} - shell: bash - run: az containerapp env delete -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.TEST_NEW_CONTAINER_APP_ENV }} -y - - - name: Delete created workspace - if: ${{ always() }} - 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' - runs-on: ubuntu-latest - permissions: - id-token: write # This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_IMAGE_TAG: 'bs-yaml-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'gh-ca-bs-yaml-${{ github.run_id }}' - TEST_YAML_FILE_PATH: '${{ github.workspace }}/yaml-samples/create-with-builder-simple.yaml' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Clone Oryx repository - uses: actions/checkout@v3 - with: - repository: microsoft/Oryx - path: oryx - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Update values in YAML configuration file - shell: pwsh - run: | - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$SUBSCRIPTION_ID$', '${{ vars.TEST_SUBSCRIPTION_ID }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$RESOURCE_GROUP$', '${{ vars.TEST_RESOURCE_GROUP_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$CONTAINER_APP_ENV$', '${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$FULL_ACR_NAME$', '${{ env.TEST_FULL_ACR_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$ACR_USERNAME$', '${{ secrets.TEST_REGISTRY_USERNAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$ACR_PASSWORD$', '${{ secrets.TEST_REGISTRY_PASSWORD }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$IMAGE_REPOSITORY$', '${{ env.TEST_IMAGE_REPOSITORY }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$IMAGE_TAG$', '${{ env.TEST_IMAGE_TAG }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }} - 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 }} - 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 }} - - - 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-image-yaml-linux: - - name: 'Create app using image with YAML configuration on Linux runner' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-bs-yaml-lin-${{ github.run_id }}' - TEST_YAML_FILE_PATH: '${{ github.workspace }}/yaml-samples/create-with-image-simple.yaml' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Clone Oryx repository - uses: actions/checkout@v3 - with: - repository: microsoft/Oryx - path: oryx - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Update values in YAML configuration file - shell: pwsh - run: | - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$SUBSCRIPTION_ID$', '${{ vars.TEST_SUBSCRIPTION_ID }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$RESOURCE_GROUP$', '${{ vars.TEST_RESOURCE_GROUP_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$CONTAINER_APP_ENV$', '${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }} - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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 - - create-using-image-yaml-windows: - - name: 'Create app using image with YAML configuration on Windows runner' - runs-on: windows-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-bs-yaml-win-${{ github.run_id }}' - TEST_YAML_FILE_PATH: 'yaml-samples/create-with-image-simple.yaml' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Clone Oryx repository - uses: actions/checkout@v3 - with: - repository: microsoft/Oryx - path: oryx - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Update values in YAML configuration file - shell: pwsh - run: | - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$SUBSCRIPTION_ID$', '${{ vars.TEST_SUBSCRIPTION_ID }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$RESOURCE_GROUP$', '${{ vars.TEST_RESOURCE_GROUP_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$CONTAINER_APP_ENV$', '${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }} - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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 - - update-using-builder: - - name: 'Update existing app using builder' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_IMAGE_TAG: 'bs-up-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'update-using-builder-app' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Clone Oryx repository - uses: actions/checkout@v3 - with: - repository: microsoft/Oryx - path: oryx - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - 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 }} - - - 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 - - - name: Update Container App with existing image - if: ${{ always() }} - shell: bash - run: az containerapp update -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -i mcr.microsoft.com/azuredocs/containerapps-helloworld:latest - - update-using-builder-and-internal-registry: - - name: 'Update existing app using builder and push to internal registry' - runs-on: ubuntu-latest - permissions: - id-token: write #This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_IMAGE_TAG: 'bs-up-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'update-using-builder-app' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Clone Oryx repository - uses: actions/checkout@v3 - with: - repository: microsoft/Oryx - path: oryx - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.OIDC_TEST_CLIENT_ID }} - tenant-id: ${{ secrets.OIDC_TEST_TENANT_ID }} - subscription-id: ${{ secrets.OIDC_TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/NetCore6PreviewWebApp' - containerAppName: ${{ vars.TEST_EXISTING_CONTAINER_APP }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - name: Update Container App with existing image - if: ${{ always() }} - shell: bash - run: az containerapp update -n ${{ vars.TEST_EXISTING_CONTAINER_APP }} -g ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} -i mcr.microsoft.com/azuredocs/containerapps-helloworld:latest - - update-using-image: - - name: 'Update app using image' - runs-on: ubuntu-latest - permissions: - id-token: write # This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'update-using-image-app' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - update-using-image-yaml: - - name: 'Update app using image with YAML configuration' - runs-on: ubuntu-latest - permissions: - id-token: write # This is required for requesting the OIDC JWT Token - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'update-using-image-yaml-app' - TEST_YAML_FILE_PATH: '${{ github.workspace }}/yaml-samples/update-with-image-simple.yaml' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - name: Azure Login - uses: azure/login@v1 - with: - client-id: ${{ secrets.TEST_CLIENT_ID }} - tenant-id: ${{ secrets.TEST_TENANT_ID }} - subscription-id: ${{ secrets.TEST_SUBSCRIPTION_ID }} - - - name: Update values in YAML configuration file - shell: pwsh - run: | - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$SUBSCRIPTION_ID$', '${{ vars.TEST_SUBSCRIPTION_ID }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$RESOURCE_GROUP$', '${{ vars.TEST_RESOURCE_GROUP_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$CONTAINER_APP_ENV$', '${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }} - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} \ No newline at end of file diff --git a/.github/workflows/run-validation.yml b/.github/workflows/run-validation.yml index 43e2a91..408deb3 100644 --- a/.github/workflows/run-validation.yml +++ b/.github/workflows/run-validation.yml @@ -17,93 +17,6 @@ env: TEST_IMAGE_REPOSITORY: github-actions/container-app jobs: - create-using-builder: - - 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 }} - - - 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' - 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' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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_NO_ACR_NAME }} -y - create-using-found-dockerfile: @@ -115,6 +28,10 @@ jobs: TEST_IMAGE_TAG: 'fd-${{ github.run_id }}' TEST_CONTAINER_APP_NAME: 'gh-ca-fd-${{ github.run_id }}' + permissions: + id-token: write + contents: read + steps: - name: Checkout action repository uses: actions/checkout@v3 @@ -125,10 +42,12 @@ jobs: repository: microsoft/Oryx path: oryx - - name: Log in to Azure - uses: azure/login@v1 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Execute Azure Container Apps Build and Deploy Action uses: ./ @@ -163,6 +82,10 @@ jobs: TEST_IMAGE_TAG: 'pd-${{ github.run_id }}' TEST_CONTAINER_APP_NAME: 'gh-ca-pd-${{ github.run_id }}' + permissions: + id-token: write + contents: read + steps: - name: Checkout action repository uses: actions/checkout@v3 @@ -173,10 +96,12 @@ jobs: repository: microsoft/Oryx path: oryx - - name: Log in to Azure - uses: azure/login@v1 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Execute Azure Container Apps Build and Deploy Action uses: ./ @@ -202,7 +127,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' @@ -212,46 +136,20 @@ jobs: env: TEST_CONTAINER_APP_NAME: 'gh-ca-is-lin-${{ github.run_id }}' - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - 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: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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 - - create-using-image-windows: - - name: 'Create app using image on Windows runner' - runs-on: windows-latest - timeout-minutes: 10 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-is-win-${{ github.run_id }}' + permissions: + id-token: write + contents: read steps: - name: Checkout action repository uses: actions/checkout@v3 - - name: Log in to Azure - uses: azure/login@v1 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Execute Azure Container Apps Build and Deploy Action uses: ./ @@ -261,130 +159,14 @@ jobs: containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }} resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} + activeRevisionsMode: 'Labels' + targetLabel: ${{ vars.TEST_TARGET_LABEL }} - 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 - create-using-image-new-env: - - name: 'Create app using image with new environment' - runs-on: ubuntu-latest - timeout-minutes: 25 - - env: - TEST_CONTAINER_APP_NAME: 'gh-ca-is-ne-${{ github.run_id }}' - TEST_NEW_CONTAINER_APP_ENV: 'gh-ca-is-ne-${{ github.run_id }}-env' - - steps: - - name: Checkout action repository - uses: actions/checkout@v3 - - - 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: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ env.TEST_NEW_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - - 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: Get customer ID for workspace to delete - if: ${{ always() }} - shell: bash - run: | - CUSTOMER_ID=$(az containerapp env show -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.TEST_NEW_CONTAINER_APP_ENV }} --query 'properties.appLogsConfiguration.logAnalyticsConfiguration.customerId') - echo "CUSTOMER_ID=${CUSTOMER_ID}" >> $GITHUB_ENV - - - name: Get name of workspace to delete - if: ${{ always() }} - shell: bash - run: | - WORKSPACE_NAME=$(az monitor log-analytics workspace list -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} --query '[?customerId == `${{ env.CUSTOMER_ID }}`].name | [0]') - echo "WORKSPACE_NAME=${WORKSPACE_NAME}" >> $GITHUB_ENV - - - name: Delete created Azure Container App environment - if: ${{ always() }} - shell: bash - run: az containerapp env delete -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.TEST_NEW_CONTAINER_APP_ENV }} -y - - - name: Delete created workspace - if: ${{ always() }} - 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' - runs-on: ubuntu-latest - timeout-minutes: 10 - - env: - TEST_IMAGE_TAG: 'bs-yaml-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'gh-ca-bs-yaml-${{ github.run_id }}' - TEST_YAML_FILE_PATH: '${{ github.workspace }}/yaml-samples/create-with-builder-simple.yaml' - - 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: Update values in YAML configuration file - shell: pwsh - run: | - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$SUBSCRIPTION_ID$', '${{ vars.TEST_SUBSCRIPTION_ID }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$RESOURCE_GROUP$', '${{ vars.TEST_RESOURCE_GROUP_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$CONTAINER_APP_ENV$', '${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$FULL_ACR_NAME$', '${{ env.TEST_FULL_ACR_NAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$ACR_USERNAME$', '${{ secrets.TEST_REGISTRY_USERNAME }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$ACR_PASSWORD$', '${{ secrets.TEST_REGISTRY_PASSWORD }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$IMAGE_REPOSITORY$', '${{ env.TEST_IMAGE_REPOSITORY }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - (Get-Content ${{ env.TEST_YAML_FILE_PATH }}).Replace('$IMAGE_TAG$', '${{ env.TEST_IMAGE_TAG }}') | Set-Content ${{ env.TEST_YAML_FILE_PATH }} - - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }} - 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 }} - 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 }} - - - 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-image-yaml-linux: @@ -396,6 +178,10 @@ jobs: TEST_CONTAINER_APP_NAME: 'gh-ca-bs-yaml-lin-${{ github.run_id }}' TEST_YAML_FILE_PATH: '${{ github.workspace }}/yaml-samples/create-with-image-simple.yaml' + permissions: + id-token: write + contents: read + steps: - name: Checkout action repository uses: actions/checkout@v3 @@ -406,10 +192,12 @@ jobs: repository: microsoft/Oryx path: oryx - - name: Log in to Azure - uses: azure/login@v1 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Update values in YAML configuration file shell: pwsh @@ -425,6 +213,8 @@ jobs: containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} + activeRevisionsMode: 'Labels' + targetLabel: ${{ vars.TEST_TARGET_LABEL }} - name: Delete created Azure Container App if: ${{ always() }} @@ -441,6 +231,10 @@ jobs: TEST_CONTAINER_APP_NAME: 'gh-ca-bs-yaml-win-${{ github.run_id }}' TEST_YAML_FILE_PATH: 'yaml-samples/create-with-image-simple.yaml' + permissions: + id-token: write + contents: read + steps: - name: Checkout action repository uses: actions/checkout@v3 @@ -451,10 +245,12 @@ jobs: repository: microsoft/Oryx path: oryx - - name: Log in to Azure - uses: azure/login@v1 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Update values in YAML configuration file shell: pwsh @@ -476,118 +272,101 @@ jobs: shell: bash run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -y - update-using-builder: + update-using-image: - name: 'Update existing app using builder' + name: 'Update app using image' runs-on: ubuntu-latest timeout-minutes: 10 env: - TEST_IMAGE_TAG: 'bs-up-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'update-using-builder-app' + TEST_CONTAINER_APP_NAME: 'update-using-image-app' + + permissions: + id-token: write + contents: read 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 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - 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 }} + imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' 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 }} - - 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 - - - name: Update Container App with existing image - if: ${{ always() }} - shell: bash - run: az containerapp update -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -i mcr.microsoft.com/azuredocs/containerapps-helloworld:latest - - update-using-builder-and-internal-registry: + create-using-image-new-env: - name: 'Update existing app using builder and push to internal registry' + name: 'Create app using image with new environment' runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 25 env: - TEST_IMAGE_TAG: 'bs-up-${{ github.run_id }}' - TEST_CONTAINER_APP_NAME: 'update-using-builder-app' + TEST_CONTAINER_APP_NAME: 'gh-ca-is-ne-${{ github.run_id }}' + TEST_NEW_CONTAINER_APP_ENV: 'gh-ca-is-ne-${{ github.run_id }}-env' + + permissions: + id-token: write + contents: read steps: - name: Checkout action repository uses: actions/checkout@v3 - - name: Clone Oryx repository - uses: actions/checkout@v3 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - repository: microsoft/Oryx - path: oryx - - - name: Log in to Azure - uses: azure/login@v1 - with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Execute Azure Container Apps Build and Deploy Action uses: ./ with: - appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/NetCore6PreviewWebApp' + imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} + containerAppEnvironment: ${{ env.TEST_NEW_CONTAINER_APP_ENV }} + resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} - - name: Update Container App with existing image + - name: Delete created Azure Container App if: ${{ always() }} shell: bash - run: az containerapp update -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} -i mcr.microsoft.com/azuredocs/containerapps-helloworld:latest - - update-using-image: - - name: 'Update app using image' - runs-on: ubuntu-latest - timeout-minutes: 10 + run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -y - env: - TEST_CONTAINER_APP_NAME: 'update-using-image-app' + - name: Get customer ID for workspace to delete + if: ${{ always() }} + shell: bash + run: | + CUSTOMER_ID=$(az containerapp env show -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.TEST_NEW_CONTAINER_APP_ENV }} --query 'properties.appLogsConfiguration.logAnalyticsConfiguration.customerId') + echo "CUSTOMER_ID=${CUSTOMER_ID}" >> $GITHUB_ENV - steps: - - name: Checkout action repository - uses: actions/checkout@v3 + - name: Get name of workspace to delete + if: ${{ always() }} + shell: bash + run: | + WORKSPACE_NAME=$(az monitor log-analytics workspace list -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} --query '[?customerId == `${{ env.CUSTOMER_ID }}`].name | [0]') + echo "WORKSPACE_NAME=${WORKSPACE_NAME}" >> $GITHUB_ENV - - name: Log in to Azure - uses: azure/login@v1 - with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + - name: Delete created Azure Container App environment + if: ${{ always() }} + shell: bash + run: az containerapp env delete -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.TEST_NEW_CONTAINER_APP_ENV }} -y - - name: Execute Azure Container Apps Build and Deploy Action - uses: ./ - with: - imageToDeploy: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest' - containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }} - containerAppEnvironment: ${{ vars.TEST_EXISTING_CONTAINER_APP_ENV }} - resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }} - disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }} + - name: Delete created workspace + if: ${{ always() }} + shell: bash + run: az monitor log-analytics workspace delete -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.WORKSPACE_NAME }} -y update-using-image-yaml: @@ -599,14 +378,20 @@ jobs: TEST_CONTAINER_APP_NAME: 'update-using-image-yaml-app' TEST_YAML_FILE_PATH: '${{ github.workspace }}/yaml-samples/update-with-image-simple.yaml' + permissions: + id-token: write + contents: read + steps: - name: Checkout action repository uses: actions/checkout@v3 - - name: Log in to Azure - uses: azure/login@v1 + - name: Log in to Azure using UAMI with OIDC + uses: azure/login@v2 with: - creds: ${{ secrets.TEST_AZURE_CREDENTIALS }} + client-id: ${{ secrets.AZURE_UAMI_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Update values in YAML configuration file shell: pwsh diff --git a/README.md b/README.md index 67d29d5..c26f96f 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,7 @@ For more information on the structure of the YAML configuration file, please vis | `environmentVariables` | No | A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret. | | `ingress` | No | Possible options: external, internal, disabled. If set to "external" (default value if not provided when creating a Container App), the Container App will be visible from the internet or a VNET, depending on the app environment endpoint configured. If set to "internal", the Container App will be visible from within the app environment only. If set to "disabled", ingress will be disabled for this Container App and will not have an HTTP or TCP endpoint. | | `disableTelemetry` | No | If set to `true`, no telemetry will be collected by this GitHub Action. If set to `false`, or if this argument is not provided, telemetry will be sent to Microsoft about the Container App build and deploy scenario targeted by this GitHub Action. | +| `TargetLabel` | No | The target label for new revisions. Will be injected into the YAML config under `properties.configuration.targetLabel` if provided. | ## Usage diff --git a/action.yml b/action.yml index e4f0068..d1206b1 100644 --- a/action.yml +++ b/action.yml @@ -138,8 +138,12 @@ inputs: not provided, telemetry will be sent to Microsoft about the Container App build and deploy scenario targeted by this GitHub Action.' required: false - default: false - + default: 'false' + targetLabel: + description: | + 'Specifies the target label for the Azure Container App revision. + This will replace any prior revision with the given label. This is required when using ActiveRevisionMode: Labels.' + required: false runs: using: 'node16' main: 'dist/index.js' diff --git a/azurecontainerapps.ts b/azurecontainerapps.ts index 93739e7..d11a3b8 100644 --- a/azurecontainerapps.ts +++ b/azurecontainerapps.ts @@ -106,6 +106,7 @@ export class azurecontainerapps { private static buildArguments: string; private static noIngressUpdate: boolean; private static useInternalRegistry: boolean; + private static targetLabel: string; /** * Initializes the helpers used by this task. @@ -160,6 +161,8 @@ export class azurecontainerapps { // Get the name of the image to build if it was provided, or generate it from build variables this.imageToBuild = this.toolHelper.getInput('imageToBuild', false); + this.targetLabel = this.toolHelper.getInput('targetLabel', false); + // Get the user defined build arguments, if provided this.buildArguments = this.toolHelper.getInput('buildArguments', false); @@ -545,6 +548,7 @@ export class azurecontainerapps { * file is not provided. */ private static setupContainerAppProperties() { + this.toolHelper.writeDebug(`Setting up Container App properties...`); this.commandLineArgs = []; // Get the ingress inputs @@ -567,6 +571,15 @@ export class azurecontainerapps { `--registry-password ${this.registryPassword}`); } + + // Handle TargetLabel setup when activeRevisionsMode is Labels + if (!this.util.isNullOrEmpty(this.targetLabel)) { + this.toolHelper.writeDebug('Target label is provided. Setting up command line arguments for revisions mode "Labels".'); + + // If the target label is provided, add it to the command line arguments + this.commandLineArgs.push(`--revisions-mode Labels`, `--target-label ${this.targetLabel}`); + } + // Determine default values only for the 'create' scenario to avoid overriding existing values for the 'update' scenario if (!this.containerAppExists) { this.ingressEnabled = true; @@ -619,6 +632,9 @@ export class azurecontainerapps { this.commandLineArgs.push(`-i ${this.imageToDeploy}`); } else if (!this.util.isNullOrEmpty(this.appSourcePath) && this.useInternalRegistry) { this.commandLineArgs.push(`--source ${this.appSourcePath}`); + } else if (!this.util.isNullOrEmpty(this.targetLabel)) { + // If the target label is provided, add it to the command line arguments + this.commandLineArgs.push(`--revisions-mode Labels`, `--target-label ${this.targetLabel}`); } } @@ -626,11 +642,14 @@ export class azurecontainerapps { * Creates or updates the Container App. */ private static async createOrUpdateContainerApp() { + this.toolHelper.writeInfo(`Creating or updating Container App "${this.containerAppName}" in resource group "${this.resourceGroup}"...`); if (!this.containerAppExists) { if (!this.util.isNullOrEmpty(this.yamlConfigPath)) { + this.toolHelper.writeInfo(`Creating Container App "${this.containerAppName}" from YAML configuration file "${this.yamlConfigPath}"...`); // Create the Container App from the YAML configuration file await this.appHelper.createContainerAppFromYaml(this.containerAppName, this.resourceGroup, this.yamlConfigPath); } else { + this.toolHelper.writeInfo(`Creating Container App "${this.containerAppName}" from command line arguments...`); // Create the Container App from command line arguments await this.appHelper.createContainerApp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.commandLineArgs); } diff --git a/dist/index.js b/dist/index.js index bf431ad..c0e8ec4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 3238: +/***/ 4024: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -16,8 +16,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -44,13 +44,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.azurecontainerapps = void 0; -var fs = __nccwpck_require__(7147); -var path = __nccwpck_require__(1017); -var ContainerAppHelper_1 = __nccwpck_require__(2929); -var ContainerRegistryHelper_1 = __nccwpck_require__(4769); -var TelemetryHelper_1 = __nccwpck_require__(7166); -var Utility_1 = __nccwpck_require__(2135); -var GitHubActionsToolHelper_1 = __nccwpck_require__(3185); +var fs = __nccwpck_require__(9896); +var path = __nccwpck_require__(6928); +var ContainerAppHelper_1 = __nccwpck_require__(3135); +var ContainerRegistryHelper_1 = __nccwpck_require__(3745); +var TelemetryHelper_1 = __nccwpck_require__(7546); +var Utility_1 = __nccwpck_require__(6393); +var GitHubActionsToolHelper_1 = __nccwpck_require__(1569); var buildArgumentRegex = /"[^"]*"|\S+/g; var buildpackEnvironmentNameRegex = /^"?(BP|ORYX)_[-._a-zA-Z0-9]+"?$/; var azurecontainerapps = /** @class */ (function () { @@ -170,6 +170,7 @@ var azurecontainerapps = /** @class */ (function () { this.yamlConfigPath = this.toolHelper.getInput('yamlConfigPath', false); // Get the name of the image to build if it was provided, or generate it from build variables this.imageToBuild = this.toolHelper.getInput('imageToBuild', false); + this.targetLabel = this.toolHelper.getInput('targetLabel', false); // Get the user defined build arguments, if provided this.buildArguments = this.toolHelper.getInput('buildArguments', false); // Ensure that one of appSourcePath, imageToDeploy, or yamlConfigPath is provided @@ -644,6 +645,7 @@ var azurecontainerapps = /** @class */ (function () { * file is not provided. */ azurecontainerapps.setupContainerAppProperties = function () { + this.toolHelper.writeDebug("Setting up Container App properties..."); this.commandLineArgs = []; // Get the ingress inputs this.ingress = this.toolHelper.getInput('ingress', false); @@ -659,6 +661,12 @@ var azurecontainerapps = /** @class */ (function () { this.adminCredentialsProvided = true; this.commandLineArgs.push("--registry-server ".concat(this.registryUrl), "--registry-username ".concat(this.registryUsername), "--registry-password ".concat(this.registryPassword)); } + // Handle TargetLabel setup when activeRevisionsMode is Labels + if (!this.util.isNullOrEmpty(this.targetLabel)) { + this.toolHelper.writeDebug('Target label is provided. Setting up command line arguments for revisions mode "Labels".'); + // If the target label is provided, add it to the command line arguments + this.commandLineArgs.push("--revisions-mode Labels", "--target-label ".concat(this.targetLabel)); + } // Determine default values only for the 'create' scenario to avoid overriding existing values for the 'update' scenario if (!this.containerAppExists) { this.ingressEnabled = true; @@ -707,6 +715,10 @@ var azurecontainerapps = /** @class */ (function () { else if (!this.util.isNullOrEmpty(this.appSourcePath) && this.useInternalRegistry) { this.commandLineArgs.push("--source ".concat(this.appSourcePath)); } + else if (!this.util.isNullOrEmpty(this.targetLabel)) { + // If the target label is provided, add it to the command line arguments + this.commandLineArgs.push("--revisions-mode Labels", "--target-label ".concat(this.targetLabel)); + } }; /** * Creates or updates the Container App. @@ -716,17 +728,20 @@ var azurecontainerapps = /** @class */ (function () { return __generator(this, function (_a) { switch (_a.label) { case 0: + this.toolHelper.writeInfo("Creating or updating Container App \"".concat(this.containerAppName, "\" in resource group \"").concat(this.resourceGroup, "\"...")); if (!!this.containerAppExists) return [3 /*break*/, 5]; if (!!this.util.isNullOrEmpty(this.yamlConfigPath)) return [3 /*break*/, 2]; + this.toolHelper.writeInfo("Creating Container App \"".concat(this.containerAppName, "\" from YAML configuration file \"").concat(this.yamlConfigPath, "\"...")); // Create the Container App from the YAML configuration file return [4 /*yield*/, this.appHelper.createContainerAppFromYaml(this.containerAppName, this.resourceGroup, this.yamlConfigPath)]; case 1: // Create the Container App from the YAML configuration file _a.sent(); return [3 /*break*/, 4]; - case 2: - // Create the Container App from command line arguments - return [4 /*yield*/, this.appHelper.createContainerApp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.commandLineArgs)]; + case 2: + this.toolHelper.writeInfo("Creating Container App \"".concat(this.containerAppName, "\" from command line arguments...")); + // Create the Container App from command line arguments + return [4 /*yield*/, this.appHelper.createContainerApp(this.containerAppName, this.resourceGroup, this.containerAppEnvironment, this.commandLineArgs)]; case 3: // Create the Container App from command line arguments _a.sent(); @@ -791,7 +806,7 @@ azurecontainerapps.runMain(); /***/ }), -/***/ 5688: +/***/ 4914: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -817,8 +832,8 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(2037)); -const utils_1 = __nccwpck_require__(869); +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); /** * Commands * @@ -890,7 +905,7 @@ function escapeProperty(s) { /***/ }), -/***/ 3195: +/***/ 7484: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -925,12 +940,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(5688); -const file_command_1 = __nccwpck_require__(3930); -const utils_1 = __nccwpck_require__(869); -const os = __importStar(__nccwpck_require__(2037)); -const path = __importStar(__nccwpck_require__(1017)); -const oidc_utils_1 = __nccwpck_require__(1755); +const command_1 = __nccwpck_require__(4914); +const file_command_1 = __nccwpck_require__(4753); +const utils_1 = __nccwpck_require__(302); +const os = __importStar(__nccwpck_require__(857)); +const path = __importStar(__nccwpck_require__(6928)); +const oidc_utils_1 = __nccwpck_require__(5306); /** * The code to exit an action */ @@ -1215,17 +1230,17 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(8606); +var summary_1 = __nccwpck_require__(1847); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(8606); +var summary_2 = __nccwpck_require__(1847); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports */ -var path_utils_1 = __nccwpck_require__(397); +var path_utils_1 = __nccwpck_require__(1976); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); @@ -1233,7 +1248,7 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct /***/ }), -/***/ 3930: +/***/ 4753: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1262,10 +1277,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(7147)); -const os = __importStar(__nccwpck_require__(2037)); -const uuid_1 = __nccwpck_require__(5814); -const utils_1 = __nccwpck_require__(869); +const fs = __importStar(__nccwpck_require__(9896)); +const os = __importStar(__nccwpck_require__(857)); +const uuid_1 = __nccwpck_require__(2048); +const utils_1 = __nccwpck_require__(302); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -1298,7 +1313,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 1755: +/***/ 5306: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1314,9 +1329,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(9780); -const auth_1 = __nccwpck_require__(8833); -const core_1 = __nccwpck_require__(3195); +const http_client_1 = __nccwpck_require__(4844); +const auth_1 = __nccwpck_require__(4552); +const core_1 = __nccwpck_require__(7484); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -1382,7 +1397,7 @@ exports.OidcClient = OidcClient; /***/ }), -/***/ 397: +/***/ 1976: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1408,7 +1423,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(1017)); +const path = __importStar(__nccwpck_require__(6928)); /** * toPosixPath converts the given path to the posix form. On Windows, \\ will be * replaced with /. @@ -1447,7 +1462,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 8606: +/***/ 1847: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1463,8 +1478,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(2037); -const fs_1 = __nccwpck_require__(7147); +const os_1 = __nccwpck_require__(857); +const fs_1 = __nccwpck_require__(9896); const { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; @@ -1737,7 +1752,7 @@ exports.summary = _summary; /***/ }), -/***/ 869: +/***/ 302: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1784,7 +1799,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 9714: +/***/ 5236: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1819,8 +1834,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(1576); -const tr = __importStar(__nccwpck_require__(5315)); +const string_decoder_1 = __nccwpck_require__(3193); +const tr = __importStar(__nccwpck_require__(6665)); /** * Exec a command. * Output will be streamed to the live console. @@ -1894,7 +1909,7 @@ exports.getExecOutput = getExecOutput; /***/ }), -/***/ 5315: +/***/ 6665: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1929,13 +1944,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(2037)); -const events = __importStar(__nccwpck_require__(2361)); -const child = __importStar(__nccwpck_require__(2081)); -const path = __importStar(__nccwpck_require__(1017)); -const io = __importStar(__nccwpck_require__(9529)); -const ioUtil = __importStar(__nccwpck_require__(7821)); -const timers_1 = __nccwpck_require__(9512); +const os = __importStar(__nccwpck_require__(857)); +const events = __importStar(__nccwpck_require__(4434)); +const child = __importStar(__nccwpck_require__(5317)); +const path = __importStar(__nccwpck_require__(6928)); +const io = __importStar(__nccwpck_require__(4994)); +const ioUtil = __importStar(__nccwpck_require__(5207)); +const timers_1 = __nccwpck_require__(3557); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -2519,7 +2534,7 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 8833: +/***/ 4552: /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -2607,7 +2622,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 9780: +/***/ 4844: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2643,10 +2658,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(3685)); -const https = __importStar(__nccwpck_require__(5687)); -const pm = __importStar(__nccwpck_require__(4492)); -const tunnel = __importStar(__nccwpck_require__(9041)); +const http = __importStar(__nccwpck_require__(8611)); +const https = __importStar(__nccwpck_require__(5692)); +const pm = __importStar(__nccwpck_require__(4988)); +const tunnel = __importStar(__nccwpck_require__(770)); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -3232,7 +3247,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), -/***/ 4492: +/***/ 4988: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -3321,7 +3336,7 @@ function isLoopbackAddress(host) { /***/ }), -/***/ 7821: +/***/ 5207: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3357,8 +3372,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(7147)); -const path = __importStar(__nccwpck_require__(1017)); +const fs = __importStar(__nccwpck_require__(9896)); +const path = __importStar(__nccwpck_require__(6928)); _a = fs.promises // export const {open} = 'fs' , exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; @@ -3511,7 +3526,7 @@ exports.getCmdPath = getCmdPath; /***/ }), -/***/ 9529: +/***/ 4994: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3546,9 +3561,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(9491); -const path = __importStar(__nccwpck_require__(1017)); -const ioUtil = __importStar(__nccwpck_require__(7821)); +const assert_1 = __nccwpck_require__(2613); +const path = __importStar(__nccwpck_require__(6928)); +const ioUtil = __importStar(__nccwpck_require__(5207)); /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js @@ -3817,27 +3832,27 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 9041: +/***/ 770: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(7111); +module.exports = __nccwpck_require__(218); /***/ }), -/***/ 7111: +/***/ 218: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var net = __nccwpck_require__(1808); -var tls = __nccwpck_require__(4404); -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var events = __nccwpck_require__(2361); -var assert = __nccwpck_require__(9491); -var util = __nccwpck_require__(3837); +var net = __nccwpck_require__(9278); +var tls = __nccwpck_require__(4756); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var events = __nccwpck_require__(4434); +var assert = __nccwpck_require__(2613); +var util = __nccwpck_require__(9023); exports.httpOverHttp = httpOverHttp; @@ -4097,7 +4112,7 @@ exports.debug = debug; // for test /***/ }), -/***/ 5814: +/***/ 2048: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4161,29 +4176,29 @@ Object.defineProperty(exports, "parse", ({ } })); -var _v = _interopRequireDefault(__nccwpck_require__(6471)); +var _v = _interopRequireDefault(__nccwpck_require__(6415)); -var _v2 = _interopRequireDefault(__nccwpck_require__(3384)); +var _v2 = _interopRequireDefault(__nccwpck_require__(1697)); -var _v3 = _interopRequireDefault(__nccwpck_require__(5940)); +var _v3 = _interopRequireDefault(__nccwpck_require__(4676)); -var _v4 = _interopRequireDefault(__nccwpck_require__(9193)); +var _v4 = _interopRequireDefault(__nccwpck_require__(9771)); -var _nil = _interopRequireDefault(__nccwpck_require__(8654)); +var _nil = _interopRequireDefault(__nccwpck_require__(7723)); -var _version = _interopRequireDefault(__nccwpck_require__(2362)); +var _version = _interopRequireDefault(__nccwpck_require__(5868)); -var _validate = _interopRequireDefault(__nccwpck_require__(9815)); +var _validate = _interopRequireDefault(__nccwpck_require__(6200)); -var _stringify = _interopRequireDefault(__nccwpck_require__(5183)); +var _stringify = _interopRequireDefault(__nccwpck_require__(7597)); -var _parse = _interopRequireDefault(__nccwpck_require__(5108)); +var _parse = _interopRequireDefault(__nccwpck_require__(7267)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 9313: +/***/ 216: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4194,7 +4209,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +var _crypto = _interopRequireDefault(__nccwpck_require__(6982)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4213,7 +4228,7 @@ exports["default"] = _default; /***/ }), -/***/ 8654: +/***/ 7723: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4228,7 +4243,7 @@ exports["default"] = _default; /***/ }), -/***/ 5108: +/***/ 7267: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4239,7 +4254,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(9815)); +var _validate = _interopRequireDefault(__nccwpck_require__(6200)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4280,7 +4295,7 @@ exports["default"] = _default; /***/ }), -/***/ 1629: +/***/ 7879: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4295,7 +4310,7 @@ exports["default"] = _default; /***/ }), -/***/ 9271: +/***/ 2973: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4306,7 +4321,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = rng; -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +var _crypto = _interopRequireDefault(__nccwpck_require__(6982)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4326,7 +4341,7 @@ function rng() { /***/ }), -/***/ 2017: +/***/ 507: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4337,7 +4352,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +var _crypto = _interopRequireDefault(__nccwpck_require__(6982)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4356,7 +4371,7 @@ exports["default"] = _default; /***/ }), -/***/ 5183: +/***/ 7597: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4367,7 +4382,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(9815)); +var _validate = _interopRequireDefault(__nccwpck_require__(6200)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4402,7 +4417,7 @@ exports["default"] = _default; /***/ }), -/***/ 6471: +/***/ 6415: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4413,9 +4428,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(9271)); +var _rng = _interopRequireDefault(__nccwpck_require__(2973)); -var _stringify = _interopRequireDefault(__nccwpck_require__(5183)); +var _stringify = _interopRequireDefault(__nccwpck_require__(7597)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4516,7 +4531,7 @@ exports["default"] = _default; /***/ }), -/***/ 3384: +/***/ 1697: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4527,9 +4542,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _v = _interopRequireDefault(__nccwpck_require__(5717)); +var _v = _interopRequireDefault(__nccwpck_require__(2930)); -var _md = _interopRequireDefault(__nccwpck_require__(9313)); +var _md = _interopRequireDefault(__nccwpck_require__(216)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4539,7 +4554,7 @@ exports["default"] = _default; /***/ }), -/***/ 5717: +/***/ 2930: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4551,9 +4566,9 @@ Object.defineProperty(exports, "__esModule", ({ exports["default"] = _default; exports.URL = exports.DNS = void 0; -var _stringify = _interopRequireDefault(__nccwpck_require__(5183)); +var _stringify = _interopRequireDefault(__nccwpck_require__(7597)); -var _parse = _interopRequireDefault(__nccwpck_require__(5108)); +var _parse = _interopRequireDefault(__nccwpck_require__(7267)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4624,7 +4639,7 @@ function _default(name, version, hashfunc) { /***/ }), -/***/ 5940: +/***/ 4676: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4635,9 +4650,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(9271)); +var _rng = _interopRequireDefault(__nccwpck_require__(2973)); -var _stringify = _interopRequireDefault(__nccwpck_require__(5183)); +var _stringify = _interopRequireDefault(__nccwpck_require__(7597)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4668,7 +4683,7 @@ exports["default"] = _default; /***/ }), -/***/ 9193: +/***/ 9771: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4679,9 +4694,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _v = _interopRequireDefault(__nccwpck_require__(5717)); +var _v = _interopRequireDefault(__nccwpck_require__(2930)); -var _sha = _interopRequireDefault(__nccwpck_require__(2017)); +var _sha = _interopRequireDefault(__nccwpck_require__(507)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4691,7 +4706,7 @@ exports["default"] = _default; /***/ }), -/***/ 9815: +/***/ 6200: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4702,7 +4717,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _regex = _interopRequireDefault(__nccwpck_require__(1629)); +var _regex = _interopRequireDefault(__nccwpck_require__(7879)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4715,7 +4730,7 @@ exports["default"] = _default; /***/ }), -/***/ 2362: +/***/ 5868: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4726,7 +4741,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(9815)); +var _validate = _interopRequireDefault(__nccwpck_require__(6200)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4743,7 +4758,7 @@ exports["default"] = _default; /***/ }), -/***/ 2929: +/***/ 3135: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -4758,8 +4773,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -4786,11 +4801,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContainerAppHelper = void 0; -var path = __nccwpck_require__(1017); -var os = __nccwpck_require__(2037); -var Utility_1 = __nccwpck_require__(2135); -var GitHubActionsToolHelper_1 = __nccwpck_require__(3185); -var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(6928); +var os = __nccwpck_require__(857); +var Utility_1 = __nccwpck_require__(6393); +var GitHubActionsToolHelper_1 = __nccwpck_require__(1569); +var fs = __nccwpck_require__(9896); var ORYX_CLI_IMAGE = 'mcr.microsoft.com/oryx/cli:builder-debian-bullseye-20230926.1'; var ORYX_BULLSEYE_BUILDER_IMAGE = 'mcr.microsoft.com/oryx/builder:debian-bullseye-20240124.1'; var ORYX_BOOKWORM_BUILDER_IMAGE = 'mcr.microsoft.com/oryx/builder:debian-bookworm-20240124.1'; @@ -4831,7 +4846,7 @@ var ContainerAppHelper = /** @class */ (function () { return [3 /*break*/, 4]; case 3: err_1 = _a.sent(); - toolHelper.writeError(err_1.message); + toolHelper.writeError("Error occurred while creating Container App \"".concat(containerAppName, "\": ").concat(err_1.message)); throw err_1; case 4: return [2 /*return*/]; } @@ -5663,7 +5678,7 @@ exports.ContainerAppHelper = ContainerAppHelper; /***/ }), -/***/ 4769: +/***/ 3745: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -5678,8 +5693,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -5706,9 +5721,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContainerRegistryHelper = void 0; -var os = __nccwpck_require__(2037); -var Utility_1 = __nccwpck_require__(2135); -var GitHubActionsToolHelper_1 = __nccwpck_require__(3185); +var os = __nccwpck_require__(857); +var Utility_1 = __nccwpck_require__(6393); +var GitHubActionsToolHelper_1 = __nccwpck_require__(1569); var toolHelper = new GitHubActionsToolHelper_1.GitHubActionsToolHelper(); var util = new Utility_1.Utility(); var ContainerRegistryHelper = /** @class */ (function () { @@ -5806,7 +5821,7 @@ exports.ContainerRegistryHelper = ContainerRegistryHelper; /***/ }), -/***/ 3185: +/***/ 1569: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -5821,8 +5836,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -5849,9 +5864,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.GitHubActionsToolHelper = void 0; -var core = __nccwpck_require__(3195); -var io = __nccwpck_require__(9529); -var exec = __nccwpck_require__(9714); +var core = __nccwpck_require__(7484); +var io = __nccwpck_require__(4994); +var exec = __nccwpck_require__(5236); var GitHubActionsToolHelper = /** @class */ (function () { function GitHubActionsToolHelper() { } @@ -5947,7 +5962,7 @@ exports.GitHubActionsToolHelper = GitHubActionsToolHelper; /***/ }), -/***/ 7166: +/***/ 7546: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -5962,8 +5977,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -5990,8 +6005,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TelemetryHelper = void 0; -var Utility_1 = __nccwpck_require__(2135); -var GitHubActionsToolHelper_1 = __nccwpck_require__(3185); +var Utility_1 = __nccwpck_require__(6393); +var GitHubActionsToolHelper_1 = __nccwpck_require__(1569); var ORYX_CLI_IMAGE = "mcr.microsoft.com/oryx/cli:debian-buster-20230207.2"; var SUCCESSFUL_RESULT = "succeeded"; var FAILED_RESULT = "failed"; @@ -6084,7 +6099,7 @@ exports.TelemetryHelper = TelemetryHelper; /***/ }), -/***/ 2135: +/***/ 6393: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -6099,8 +6114,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -6128,7 +6143,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Utility = void 0; // Note: This file is used to define utility functions that can be used across the project. -var GitHubActionsToolHelper_1 = __nccwpck_require__(3185); +var GitHubActionsToolHelper_1 = __nccwpck_require__(1569); var toolHelper = new GitHubActionsToolHelper_1.GitHubActionsToolHelper(); var Utility = /** @class */ (function () { function Utility() { @@ -6178,7 +6193,7 @@ exports.Utility = Utility; /***/ }), -/***/ 9491: +/***/ 2613: /***/ ((module) => { "use strict"; @@ -6186,7 +6201,7 @@ module.exports = require("assert"); /***/ }), -/***/ 2081: +/***/ 5317: /***/ ((module) => { "use strict"; @@ -6194,7 +6209,7 @@ module.exports = require("child_process"); /***/ }), -/***/ 6113: +/***/ 6982: /***/ ((module) => { "use strict"; @@ -6202,7 +6217,7 @@ module.exports = require("crypto"); /***/ }), -/***/ 2361: +/***/ 4434: /***/ ((module) => { "use strict"; @@ -6210,7 +6225,7 @@ module.exports = require("events"); /***/ }), -/***/ 7147: +/***/ 9896: /***/ ((module) => { "use strict"; @@ -6218,7 +6233,7 @@ module.exports = require("fs"); /***/ }), -/***/ 3685: +/***/ 8611: /***/ ((module) => { "use strict"; @@ -6226,7 +6241,7 @@ module.exports = require("http"); /***/ }), -/***/ 5687: +/***/ 5692: /***/ ((module) => { "use strict"; @@ -6234,7 +6249,7 @@ module.exports = require("https"); /***/ }), -/***/ 1808: +/***/ 9278: /***/ ((module) => { "use strict"; @@ -6242,7 +6257,7 @@ module.exports = require("net"); /***/ }), -/***/ 2037: +/***/ 857: /***/ ((module) => { "use strict"; @@ -6250,7 +6265,7 @@ module.exports = require("os"); /***/ }), -/***/ 1017: +/***/ 6928: /***/ ((module) => { "use strict"; @@ -6258,7 +6273,7 @@ module.exports = require("path"); /***/ }), -/***/ 1576: +/***/ 3193: /***/ ((module) => { "use strict"; @@ -6266,7 +6281,7 @@ module.exports = require("string_decoder"); /***/ }), -/***/ 9512: +/***/ 3557: /***/ ((module) => { "use strict"; @@ -6274,7 +6289,7 @@ module.exports = require("timers"); /***/ }), -/***/ 4404: +/***/ 4756: /***/ ((module) => { "use strict"; @@ -6282,7 +6297,7 @@ module.exports = require("tls"); /***/ }), -/***/ 3837: +/***/ 9023: /***/ ((module) => { "use strict"; @@ -6332,7 +6347,7 @@ module.exports = require("util"); /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __nccwpck_require__(3238); +/******/ var __webpack_exports__ = __nccwpck_require__(4024); /******/ module.exports = __webpack_exports__; /******/ /******/ })() diff --git a/package-lock.json b/package-lock.json index 32e7625..414b7c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,10 +12,12 @@ "@actions/core": "^1.10.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.1.1", + "ncc": "^0.3.6", "typescript": "^5.2.2" }, "devDependencies": { - "@types/node": "^20.6.0" + "@types/node": "^20.17.57", + "@vercel/ncc": "^0.38.3" } }, "node_modules/@actions/core": { @@ -161,21 +163,119 @@ } }, "node_modules/@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", - "dev": true + "version": "20.17.57", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.57.tgz", + "integrity": "sha512-f3T4y6VU4fVQDKVqJV4Uppy8c1p/sVvS3peyqxyWnzkqXFJLRU7Y1Bl7rMS1Qe9z0v4M6McY0Fp9yBsgHJUsWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@vercel/ncc": { + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz", + "integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==", + "dev": true, + "license": "MIT", + "bin": { + "ncc": "dist/ncc/cli.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" }, "node_modules/before-after-hook": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/colors": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.3.tgz", + "integrity": "sha512-qTfM2pNFeMZcLvf/RbrVAzDEVttZjFhaApfx9dplNjvHSX88Ui66zBRb/4YGob/xUWxDceirgoC1lT676asfCQ==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -184,6 +284,51 @@ "node": ">=0.10.0" } }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ncc": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/ncc/-/ncc-0.3.6.tgz", + "integrity": "sha512-OXudTB2Ebt/FnOuDoPQbaa17+tdVqSOWA+gLfPxccWwsNED1uA2zEhpoB1hwdFC9yYbio/mdV5cvOtQI3Zrx1w==", + "license": "MIT", + "dependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "tracer": "^0.8.7", + "ws": "^2.3.1" + } + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -211,11 +356,63 @@ "wrappy": "1" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha512-cr7dZWLwOeaFBLTIuZeYdkfO7UzGIKhjYENJFAxUOMKWGaWDm2nJM2rzxNRm5Owu0DH3ApwNo6kx5idXZfb/Iw==", + "license": "MIT" + }, + "node_modules/tinytim": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", + "integrity": "sha512-NIpsp9lBIxPNzB++HnMmUd4byzJSVbbO4F+As1Gb1IG/YQT5QvmBDjpx8SpDS8fhGC+t+Qw8ldQgbcAIaU+2cA==", + "license": "MIT", + "engines": { + "node": ">= 0.2.0" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "node_modules/tracer": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/tracer/-/tracer-0.8.15.tgz", + "integrity": "sha512-ZQzlhd6zZFIpAhACiZkxLjl65XqVwi8t8UEBVGRIHAQN6nj55ftJWiFell+WSqWCP/vEycrIbUSuiyMwul+TFw==", + "license": "MIT", + "dependencies": { + "colors": "1.2.3", + "dateformat": "3.0.3", + "mkdirp": "^0.5.1", + "tinytim": "0.1.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -236,6 +433,19 @@ "node": ">=14.17" } }, + "node_modules/ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, "node_modules/universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -267,6 +477,16 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/ws": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-2.3.1.tgz", + "integrity": "sha512-61a+9LgtYZxTq1hAonhX8Xwpo2riK4IOR/BIVxioFbCfc3QFKmpE4x9dLExfLHKtUfVZigYa36tThVhO57erEw==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.0.1", + "ultron": "~1.1.0" + } } }, "dependencies": { @@ -407,26 +627,128 @@ } }, "@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", + "version": "20.17.57", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.57.tgz", + "integrity": "sha512-f3T4y6VU4fVQDKVqJV4Uppy8c1p/sVvS3peyqxyWnzkqXFJLRU7Y1Bl7rMS1Qe9z0v4M6McY0Fp9yBsgHJUsWQ==", + "dev": true, + "requires": { + "undici-types": "~6.19.2" + } + }, + "@vercel/ncc": { + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz", + "integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==", "dev": true }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, "before-after-hook": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "colors": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.3.tgz", + "integrity": "sha512-qTfM2pNFeMZcLvf/RbrVAzDEVttZjFhaApfx9dplNjvHSX88Ui66zBRb/4YGob/xUWxDceirgoC1lT676asfCQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + }, "deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "ncc": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/ncc/-/ncc-0.3.6.tgz", + "integrity": "sha512-OXudTB2Ebt/FnOuDoPQbaa17+tdVqSOWA+gLfPxccWwsNED1uA2zEhpoB1hwdFC9yYbio/mdV5cvOtQI3Zrx1w==", + "requires": { + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "tracer": "^0.8.7", + "ws": "^2.3.1" + } + }, "node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -443,11 +765,45 @@ "wrappy": "1" } }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha512-cr7dZWLwOeaFBLTIuZeYdkfO7UzGIKhjYENJFAxUOMKWGaWDm2nJM2rzxNRm5Owu0DH3ApwNo6kx5idXZfb/Iw==" + }, + "tinytim": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", + "integrity": "sha512-NIpsp9lBIxPNzB++HnMmUd4byzJSVbbO4F+As1Gb1IG/YQT5QvmBDjpx8SpDS8fhGC+t+Qw8ldQgbcAIaU+2cA==" + }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "tracer": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/tracer/-/tracer-0.8.15.tgz", + "integrity": "sha512-ZQzlhd6zZFIpAhACiZkxLjl65XqVwi8t8UEBVGRIHAQN6nj55ftJWiFell+WSqWCP/vEycrIbUSuiyMwul+TFw==", + "requires": { + "colors": "1.2.3", + "dateformat": "3.0.3", + "mkdirp": "^0.5.1", + "tinytim": "0.1.1" + } + }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -458,6 +814,17 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==" }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, "universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -486,6 +853,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "ws": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-2.3.1.tgz", + "integrity": "sha512-61a+9LgtYZxTq1hAonhX8Xwpo2riK4IOR/BIVxioFbCfc3QFKmpE4x9dLExfLHKtUfVZigYa36tThVhO57erEw==", + "requires": { + "safe-buffer": "~5.0.1", + "ultron": "~1.1.0" + } } } } diff --git a/package.json b/package.json index 6b9c3dc..7af1360 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,11 @@ "@actions/core": "^1.10.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.1.1", + "ncc": "^0.3.6", "typescript": "^5.2.2" }, "devDependencies": { - "@types/node": "^20.6.0" + "@types/node": "^20.17.57", + "@vercel/ncc": "^0.38.3" } } diff --git a/src/ContainerAppHelper.ts b/src/ContainerAppHelper.ts index 3124083..4085adc 100644 --- a/src/ContainerAppHelper.ts +++ b/src/ContainerAppHelper.ts @@ -32,15 +32,18 @@ export class ContainerAppHelper { resourceGroup: string, environment: string, optionalCmdArgs: string[]) { + toolHelper.writeDebug(`Attempting to create Container App with name "${containerAppName}" in resource group "${resourceGroup}"`); try { let command = `az containerapp create -n ${containerAppName} -g ${resourceGroup} --environment ${environment} --output none`; + optionalCmdArgs.forEach(function (val: string) { command += ` ${val}`; }); + await util.execute(command); } catch (err) { - toolHelper.writeError(err.message); + toolHelper.writeError(`Error occurred while creating Container App "${containerAppName}": ${err.message}`); throw err; } }