Skip to content

comment out env vars #4

comment out env vars

comment out env vars #4

Workflow file for this run

name: PR - Opex Dashboard
on:
workflow_dispatch:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
branches:
- main
paths:
- "apps/io-wallet-user-func/.opex/**"
- "apps/io-wallet-user-func/openapi.yaml"
- ".github/workflows/pr_opex.yaml"
- ".github/workflows/release_opex.yaml"
push:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
env:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_USE_OIDC: true
# ARM_USE_AZUREAD: true
# ARM_STORAGE_USE_AZUREAD: true
DOCKER_IMAGE_TAG: sha256:04d8ead53c772d23b094c2a395292dc159e6f2905e1b13b5f828f31eac6eb27f
TEMPLATE_DIR: azure-dashboard
APP_NAME: io-wallet-user-func
API_NAME: management
jobs:
tf_plan:
runs-on: ubuntu-22.04
name: Terraform Plan
environment: opex-prod-ci
permissions:
pull-requests: read
id-token: write
contents: read
env:
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
name: Checkout
- name: Azure Login
uses: azure/login@v2 # v2.0.0
with:
client-id: ${{ env.ARM_CLIENT_ID }}
tenant-id: ${{ env.ARM_TENANT_ID }}
subscription-id: ${{ env.ARM_SUBSCRIPTION_ID }}
- name: Set Terraform Version
id: set-terraform-version
run: |
set -eu
terraform_version=$(cat .terraform-version)
printf "terraform_version=$terraform_version" >> "$GITHUB_OUTPUT"
# - uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
# name: Setup Terraform
# with:
# terraform_version: ${{ steps.set-terraform-version.outputs.terraform_version }}
# - name: Terraform Init
# working-directory: ${{ steps.directory.outputs.dir }}
# run: |
# terraform init
- name: Plan Opex Dashbaord
shell: bash
id: opex_docker
run: |
docker run \
--workdir /github/workspace --rm \
-v $(pwd):"/github/workspace" \
ghcr.io/pagopa/opex-dashboard-azure-action@${{ env.DOCKER_IMAGE_TAG }} ${{ env.TEMPLATE_DIR }} apps/${{ env.APP_NAME }}/.opex/${{ env.API_NAME }}/env/prod/config.yaml
- name: Copy Environments
shell: bash
id: opex_copy
run: |
cp -R apps/${{ env.APP_NAME }}/.opex/${{ env.API_NAME }}/env ./${{ env.TEMPLATE_DIR }}
- name: Setup Terraform
id: terraform_setup
uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
with:
terraform_version: ${{ steps.set-terraform-version.outputs.terraform_version }}
- name: Terraform Plan
shell: bash
id: terraform_plan
working-directory: ${{ env.TEMPLATE_DIR }}
run: |
bash ./terraform.sh plan prod
# bash ./terraform.sh plan prod -no-color | tee plan_output.txt
# OUTPUT="$(cat plan_output.txt | grep -v "Refreshing state" | tail -c 60000)"
# echo "$OUTPUT" > plan_output_multiline.txt