From 3b0117c394171d172472fb82e2afbc14fedbc576 Mon Sep 17 00:00:00 2001 From: Sidney Andrews Date: Mon, 8 Jan 2024 17:21:14 -0500 Subject: [PATCH] Removed extra workflows --- .github/workflows/azure-dev.yml | 67 --------------------------------- .github/workflows/container.yml | 43 --------------------- 2 files changed, 110 deletions(-) delete mode 100644 .github/workflows/azure-dev.yml delete mode 100644 .github/workflows/container.yml diff --git a/.github/workflows/azure-dev.yml b/.github/workflows/azure-dev.yml deleted file mode 100644 index da911bd..0000000 --- a/.github/workflows/azure-dev.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Deploy to Azure using AZD -on: - workflow_dispatch: - push: - branches: - - main - -# GitHub Actions workflow to deploy to Azure using azd -# To configure required secrets for connecting to Azure, simply run `azd pipeline config` - -# Set up permissions for deploying with secretless Azure federated credentials -# https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication -permissions: - id-token: write - contents: read - -jobs: - build: - runs-on: ubuntu-latest - env: - AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} - AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install azd - uses: Azure/setup-azd@v0.1.0 - - - name: Log in with Azure (Federated Credentials) - if: ${{ env.AZURE_CLIENT_ID != '' }} - run: | - azd auth login ` - --client-id "$Env:AZURE_CLIENT_ID" ` - --federated-credential-provider "github" ` - --tenant-id "$Env:AZURE_TENANT_ID" - shell: pwsh - - - name: Log in with Azure (Client Credentials) - if: ${{ env.AZURE_CREDENTIALS != '' }} - run: | - $info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable; - Write-Host "::add-mask::$($info.clientSecret)" - - azd auth login ` - --client-id "$($info.clientId)" ` - --client-secret "$($info.clientSecret)" ` - --tenant-id "$($info.tenantId)" - shell: pwsh - env: - AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Provision Infrastructure - run: azd provision --no-prompt - env: - AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }} - AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} - AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} - - - name: Deploy Application - run: azd deploy --no-prompt - env: - AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }} - AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} - AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} \ No newline at end of file diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml deleted file mode 100644 index 68081f9..0000000 --- a/.github/workflows/container.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build Docker container image -on: - schedule: - - cron: '0 0 * * 2' - workflow_dispatch: - pull_request: - push: - branches: - - main -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} -jobs: - deploy-container: - name: Build Docker container image - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata tags and labels - id: extract-metadata - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build container image - uses: docker/build-push-action@v5 - with: - context: ./src/ - file: ./src/web/Dockerfile - load: ${{ github.event_name == 'pull_request' }} - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.extract-metadata.outputs.tags }} - labels: ${{ steps.extract-metadata.outputs.labels }} \ No newline at end of file