Skip to content

Detecting changes in VERSION files #6

Detecting changes in VERSION files

Detecting changes in VERSION files #6

Workflow file for this run

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 }}"