Skip to content

Commit

Permalink
Remove deploying to Azure (#301)
Browse files Browse the repository at this point in the history
* Remove deploying to Azure

* Allow preview tags to trigger the workflow
  • Loading branch information
Smalls1652 authored Nov 15, 2024
1 parent 94b60b2 commit 4593369
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions .github/workflows/create-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ on:
push:
tags:
- "v*.*.*"
- "v*.*.*-*"

workflow_dispatch:
inputs:
push:
description: "Push to container registry"
required: false
default: true
type: boolean
deployToAzure:
description: "Deploy to Azure"
required: false
default: true
type: boolean

permissions:
packages: write
Expand All @@ -25,8 +22,6 @@ jobs:
create-muzakbot-image:
name: Create MuzakBot image
runs-on: ubuntu-latest
outputs:
image: ${{ steps.output_image.outputs.image }}

steps:
- name: "Checkout GitHub Action"
Expand Down Expand Up @@ -74,41 +69,7 @@ jobs:
build-args: |
"NUGET_USER=${{ github.repository_owner }}"
"NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }}"
- name: Set output image
id: output_image
shell: pwsh
run: |
$repoOwner = "${{ github.repository_owner }}".ToLower()
$imageDigest = "${{ steps.image_build.outputs.digest }}"
"image=ghcr.io/$($repoOwner)/muzakbot@$($imageDigest)" >> $env:GITHUB_OUTPUT
deploy-muzakbotto-azure:
name: Deploy MuzakBot to Azure
runs-on: ubuntu-latest
needs: create-muzakbot-image
environment: Production

if: ${{ github.event_name == 'push' || github.event.inputs.deployToAzure == true }}

permissions:
id-token: write

steps:
- name: Log into Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Deploy to Azure Container Apps
uses: azure/container-apps-deploy-action@v2
with:
containerAppName: ${{ secrets.AZURE_CONTAINER_APP_NAME }}
resourceGroup: ${{ secrets.AZURE_CONTAINER_RESOURCE_GROUP_NAME }}
imageToDeploy: ${{ needs.create-muzakbot-image.outputs.image }}

create-webapp-image:
name: Create WebApp image
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4593369

Please sign in to comment.