Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/installer-xml-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Installer XML change reminder

When an individual installer changes, the shared installer may need an update.

After `reusable_installer_xml_check.yml` is merged, add
`.github/workflows/installer_xml_check.yml` to each repository that needs the
check:

```yaml
name: Installer XML changes

on:
pull_request:

permissions:
contents: read

jobs:
check:
uses: aws-deadline/.github/.github/workflows/reusable_installer_xml_check.yml@mainline
```

The check fails when XML files under `installer/` or `install_builder/` change.
Review the files listed in the log, check whether the shared installer needs an
update, and confirm any follow-up in the PR discussion.

Keep private details and links out of public PR discussions.
49 changes: 49 additions & 0 deletions .github/workflows/reusable_installer_xml_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

# Call from a standalone Installer XML changes workflow in each repository.
# This advisory check reports installer XML edits for PR review.
name: Installer XML changes

on:
workflow_call:

permissions: {}

jobs:
installer-xml-changes:
name: Installer XML changes
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- name: Checkout PR history
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- name: Check installer XML changes
shell: python
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
import os
import subprocess

changed_files = subprocess.check_output([
"git", "-c", "core.quotePath=true", "diff", "--no-ext-diff", "--no-textconv",
"--no-renames", "--name-only",
f"{os.environ['BASE_SHA']}...{os.environ['HEAD_SHA']}", "--",
":(glob)installer/**/*.[xX][mM][lL]",
":(glob)install_builder/**/*.[xX][mM][lL]",
], text=True)
if changed_files:
print(changed_files, end="")
print(
"::error::Installer definitions changed. Please verify whether any related "
"internal changes are needed to reflect the changes in this PR."
)
raise SystemExit(1)
Loading