Detecting changes in VERSION files #6
This file contains 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: test-detecting-version-changes | |
run-name: Detecting changes in VERSION files | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '*/VERSION' | |
jobs: | |
print-changed-services: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Store services with changed VERSION files | |
id: changed-services | |
run: | | |
echo "services='$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep '/VERSION$' | cut -d '/' -f 1 | uniq)'" >> "$GITHUB_OUTPUT" | |
- name: Print services with changed VERSION files | |
run: | | |
echo "Services with changed VERSION files: ${{ steps.changed-services.outputs.services }}" |