Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 committed Apr 8, 2024
1 parent a3582cb commit 551f4a9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/call_code_review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ on:
type: string
required: false
description: List of environment variables to set up, given in env=value format.
job_agent:
type: choice
options:
- ubuntu-20.04
- self-hosted
default: ubuntu-20-04
use_self_hosted_agent:
type: boolean
default: false
required: false
description: Specify which agent must be used, managed or self hosted
description: True to use a vnet integrated self-hosted agent

env:
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
ARM_USE_OIDC: true
ARM_USE_AZUREAD: true
ARM_STORAGE_USE_AZUREAD: true
AGENT: ${{ inputs.use_self_hosted_agent == true && 'ubuntu-20.04' || 'self-hosted' }}

jobs:
tf_plan:
name: 'Terraform Plan'
runs-on: ${{ inputs.job_agent }}
runs-on: ${{ env.AGENT }}
environment: ${{ inputs.environment }}-ci
permissions:
id-token: write
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/call_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,25 @@ on:
type: string
required: false
description: List of environment variables to set up, given in env=value format.
job_agent:
type: choice
options:
- ubuntu-20.04
- self-hosted
default: ubuntu-20-04
use_self_hosted_agent:
type: boolean
default: false
required: false
description: Specify which agent must be used, managed or self hosted
description: True to use a vnet integrated self-hosted agent

env:
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
ARM_USE_OIDC: true
ARM_USE_AZUREAD: true
ARM_STORAGE_USE_AZUREAD: true
AGENT: ${{ inputs.use_self_hosted_agent == true && 'ubuntu-20.04' || 'self-hosted' }}

jobs:

tf_plan:
name: 'Terraform Plan'
runs-on: ${{ inputs.job_agent }}
runs-on: ${{ env.AGENT }}
environment: ${{ inputs.environment }}-ci
permissions:
id-token: write
Expand Down Expand Up @@ -94,7 +92,7 @@ jobs:

tf_apply:
name: 'Terraform Apply'
runs-on: ${{ inputs.job_agent }}
runs-on: ${{ env.AGENT }}
needs: [tf_plan]
environment: ${{ inputs.environment }}-cd
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/elt_cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
with:
environment: prod
dir: "src/domains/elt/prod/westeurope"
job_agent: self-hosted
use_self_hosted_agent: true

0 comments on commit 551f4a9

Please sign in to comment.