Skip to content

Commit

Permalink
fix: CI - Fixed moduleIndex implementation for scheduled runs (#2863)
Browse files Browse the repository at this point in the history
## Description

- Added code we use in the module pipelines to read workflow inputs and
rely on that task as opposed to direct runtime parameter references
(which are only available during workflow_dispatch)

Condition tests
_With tickbox_

![image](https://github.com/user-attachments/assets/2cd355a9-5c06-4143-9003-deeb3b2a4440)

_Without tickbox_

![image](https://github.com/user-attachments/assets/0a9ed2cc-c977-40f1-aa3e-0a593992846b)

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
| [![.Platform - Publish
[moduleIndex.json]](https://github.com/Azure/bicep-registry-modules/actions/workflows/platform.publish-module-index-json.yml/badge.svg?event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/platform.publish-module-index-json.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [x] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation
  • Loading branch information
AlexanderSehr authored Jul 28, 2024
1 parent 8eb3b70 commit 2a48a03
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/platform.publish-module-index-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ permissions:
id-token: write
contents: read

env:
workflowPath: ".github/workflows/avm.res.app.job.yml"

jobs:
upload-index-data:
runs-on: ubuntu-latest
Expand All @@ -23,7 +26,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 // Needed to fetch all history and tags

- name: "Set input parameter``s to output variables"
id: get-workflow-param
uses: ./.github/actions/templates/avm-getWorkflowInput
with:
workflowPath: "${{ env.workflowPath}}"
- name: Log in to Azure
uses: azure/login@v2
with:
Expand Down Expand Up @@ -55,7 +62,7 @@ jobs:
ErrorAction = 'Continue'
}
if ('${{ (fromJson(inputs.regenIndexFromBRM)) }}' -eq $true ) {
if ('${{ (fromJson(steps.get-workflow-param.outputs.workflowInput)).regenIndexFromBRM }}' -eq $true ) {
$functionInput['doNotMergeWithLastModuleIndexJsonFileVersion'] = $true
}
Expand Down

0 comments on commit 2a48a03

Please sign in to comment.