Skip to content

Commit

Permalink
ci: exclude md files when determining if infra changed (#834)
Browse files Browse the repository at this point in the history
#### Motivation

If a `md` file is modified, the CI process should not deployed the
infrastructure as there is no change.

#### Modification

- exclude `md` files from the `git diff`

#### Checklist

- [ ] Tests updated
- [ ] Docs updated
- [ ] Issue linked in Title
  • Loading branch information
paulfouquet authored Oct 29, 2024
1 parent 3ac7347 commit 4038020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Find Changes in Infra
id: get-infra-changes
run: |
mapfile -d '' modified_infra_files < <(git diff --name-only -z ${{ github.event.before }} ${{ github.event.after }} -- "infra/*")
mapfile -d '' modified_infra_files < <(git diff --name-only -z ${{ github.event.before }} ${{ github.event.after }} -- "infra/*" ":(exclude)infra/*.md")
if [[ "${#modified_infra_files[@]}" -ge 1 ]]; then
echo "run_infra=true" >> "$GITHUB_OUTPUT"
else
Expand Down

0 comments on commit 4038020

Please sign in to comment.