Skip to content

Commit

Permalink
ci: fix deployment parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
whichwit committed Jan 23, 2025
1 parent f20a9d2 commit b0196ed
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
name: Create and publish a Docker image
name: Publish package to GitHub Container Registry

# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['master']
tags:
- 'v*'
release:
types: [published]
branches: [master]
workflow_dispatch:
inputs:
tag-release:
type: boolean
description: Tag release build

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
target_environment:
description: 'Target environment'
required: true
default: production
type: choice
options:
- production
- development

permissions:
contents: read
packages: write
attestations: write
id-token: write

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}


# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
deploy-aca:
runs-on: ubuntu-latest
needs: build-and-push-image
environment: production
environment: ${{ inputs.target_environment || 'production'}}
steps:
- name: Azure login
uses: azure/login@v2
Expand All @@ -84,8 +85,7 @@ jobs:
- name: Deploy container
uses: azure/container-apps-deploy-action@v2
with:
registryUrl: ${{ env.REGISTRY }}
imageToDeploy: ${{ env.IMAGE_NAME }}:edge
imageToDeploy: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:edge
containerAppName: ${{ vars.ACA_NAME }}
resourceGroup: ${{ vars.ACA_RESOURCE_GROUP }}
containerAppEnvironment: ${{ vars.ACA_APP_ENVIRONMENT }}
Expand Down

0 comments on commit b0196ed

Please sign in to comment.