Skip to content

Commit

Permalink
chore: testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Mallory committed Feb 9, 2024
1 parent d7fbd02 commit 36a669d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,28 @@ jobs:
- name: Check for changes in subdirectories
id: check_changes
run: |
CHANGED=false
CHANGED_DIRS=""
for dir in stuff/*; do
if git diff --quiet HEAD^ HEAD -- $dir; then
echo "::set-output name=changed::true"
CHANGED=true
break
if ! git diff --quiet HEAD^ HEAD -- "$dir"; then
# If changes are detected, append the directory to the list
CHANGED_DIRS="$CHANGED_DIRS $dir"
fi
done
if [ "$CHANGED" = false ]; then
if [ -z "$CHANGED_DIRS" ]; then
echo "No changes detected in stuff/* directories."
exit 0
else
# Output the changed directories for further steps
echo "Changed directories: $CHANGED_DIRS"
echo "::set-output name=changed_dirs::$CHANGED_DIRS"
fi
- name: Create and push tag
if: steps.check_changes.outputs.changed == 'true'
if: steps.check_changes.outputs.changed_dirs
run: |
echo "Changed directories are ${{ steps.check_changes.outputs.changed_dirs }}"
TAG_NAME="changes-${{ steps.datetime.outputs.timestamp }}"
git config user.name github-actions
git config user.email github-actions@github.com
Expand Down
3 changes: 2 additions & 1 deletion stuff/stuff001/testchange
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
1
2
2
3

0 comments on commit 36a669d

Please sign in to comment.