Skip to content

Commit

Permalink
Update get_discussions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SoumayaMauthoorMOJ authored Oct 16, 2024
1 parent c98099e commit 5f09009
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/get_discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,20 @@ jobs:
id: check_changes
run: |
git diff --exit-code tech_radar/blips.json || echo "blips.json modified"
continue-on-error: true

- name: Detect if changes were made
id: changes_detected
run: |
git diff --exit-code tech_radar/blips.json
if [ $? -ne 0 ]; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
- name: Commit changes if any
if: steps.check_changes.outputs.changed == 'true'
if: steps.changes_detected.outputs.changed == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
Expand All @@ -40,15 +51,15 @@ jobs:
git commit -m "Auto-update blips.json"
- name: Push changes to new branch
if: steps.check_changes.outputs.changed == 'true'
if: steps.changes_detected.outputs.changed == 'true'
run: |
git push origin update-blips-branch
- name: Create Pull Request
if: steps.check_changes.outputs.changed == 'true'
if: steps.changes_detected.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
branch: update-blips-branch
title: 'Auto-update blips.json'
body: 'This PR updates the blips.json file automatically.'
labels: 'auto-update'
labels: 'auto-update'

0 comments on commit 5f09009

Please sign in to comment.