fix: possible recursion issue with not found instances #139
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI 👷 | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup OpenTofu | |
| uses: opentofu/setup-opentofu@main | |
| - name: Tofu init | |
| run: tofu init | |
| - name: Tofu fmt | |
| run: tofu fmt --recursive --check | |
| - name: Validate Lifecycle Manager | |
| run: | | |
| # If the ./lifecycle_manager/main.py file has been modified, make sure the zip file was rebuilt | |
| if git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -q "lifecycle_manager/main.py"; then | |
| echo "Lifecycle Manager main.py has been modified, checking zip file..." | |
| cd lifecycle_manager | |
| ./build_lifecycle_manager.sh | |
| # Check if rebuilding the zip creates any changes (indicating the committed zip is outdated) | |
| if git diff --exit-code -- ec2-workerpool-lifecycle-manager.zip; then | |
| echo "Lifecycle Manager zip file is up to date with main.py changes." | |
| else | |
| echo "ERROR: Lifecycle Manager zip file is not up to date!" | |
| echo "The zip file in the repository doesn't match what would be generated from the current main.py." | |
| echo "Please rebuild the zip file using './lifecycle_manager/build_lifecycle_manager.sh' and commit the updated zip." | |
| exit 1 | |
| fi | |
| else | |
| echo "Lifecycle Manager main.py has not been modified, skipping zip file check." | |
| fi |