Skip to content

Commit

Permalink
feat: Added module avm/res/logic/workflow (#616)
Browse files Browse the repository at this point in the history
## Description

Added module `avm/res/logic/workflow` migrated from CARML.
Closes Azure/Azure-Verified-Modules#182 

## Adding a new module

<!--Run through the checklist if your PR adds a new module.-->

- [x] A proposal has been submitted and approved.
- [x] I have included "Closes #{module_proposal_issue_number}" in the PR
description.
- [x] I have run `brm validate` locally to verify the module files.
- [x] I have run deployment tests locally to ensure the module is
deployable.

### Pipeline references
<!-- For module/pipeline changes, please create and attach the status
badge of your successful run. -->

| Pipeline |
| - |

[![avm.res.logic.workflow](https://github.com/lsnoddy/bicep-registry-modules/actions/workflows/avm.res.logic.workflow.yml/badge.svg?branch=users%2Flsnoddy%2Flogic-workflow)](https://github.com/lsnoddy/bicep-registry-modules/actions/workflows/avm.res.logic.workflow.yml)

---------

Co-authored-by: Alexander Sehr <[email protected]>
  • Loading branch information
lsnoddy and AlexanderSehr authored Nov 13, 2023
1 parent af46479 commit ecf069c
Show file tree
Hide file tree
Showing 10 changed files with 2,307 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/avm.res.logic.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: "avm.res.logic.workflow"

on:
schedule:
- cron: "0 12 1/15 * *" # Bi-Weekly Test (on 1st & 15th of month)
workflow_dispatch:
inputs:
staticValidation:
type: boolean
description: "Execute static validation"
required: false
default: true
deploymentValidation:
type: boolean
description: "Execute deployment validation"
required: false
default: true
removeDeployment:
type: boolean
description: "Remove deployed module"
required: false
default: true

push:
branches:
- main
paths:
- ".github/actions/templates/avm-**"
- ".github/workflows/avm.template.module.yml"
- ".github/workflows/avm.res.logic.workflow"
- "avm/res/logic/workflow/**"
- "avm/utilities/pipelines/**"
- "!*/**/README.md"

env:
modulePath: "avm/res/logic/workflow"
workflowPath: ".github/workflows/avm.res.logic.workflow.yml"

concurrency:
group: ${{ github.workflow }}

jobs:
###########################
# Initialize pipeline #
###########################
job_initialize_pipeline:
runs-on: ubuntu-20.04
name: "Initialize pipeline"
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set input parameters to output variables"
id: get-workflow-param
uses: ./.github/actions/templates/avm-getWorkflowInput
with:
workflowPath: "${{ env.workflowPath}}"
- name: "Get parameter file paths"
id: get-module-test-file-paths
uses: ./.github/actions/templates/avm-getModuleTestFiles
with:
modulePath: "${{ env.modulePath }}"
outputs:
workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }}
moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }}
modulePath: "${{ env.modulePath }}"

##############################
# Call reusable workflow #
##############################
call-workflow-passing-data:
name: "Module"
needs:
- job_initialize_pipeline
uses: ./.github/workflows/avm.template.module.yml
with:
workflowInput: "${{ needs.job_initialize_pipeline.outputs.workflowInput }}"
moduleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}"
modulePath: "${{ needs.job_initialize_pipeline.outputs.modulePath}}"
secrets: inherit
Loading

0 comments on commit ecf069c

Please sign in to comment.