Skip to content

Commit

Permalink
Replace set-output command with environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Jul 15, 2024
1 parent 99f849c commit 7e258fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/update_datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ jobs:
git diff
if [ -n "$(git status -s)" ]; then
echo "Changes detected"
echo "::set-output name=changes_detected::true"
fi
echo "changes_detected=true" >> $GITHUB_ENV
else
echo "changes_detected=false" >> $GITHUB_ENV
- name: Commit changes
if: steps.git-check.outputs.changes_detected == 'true'
if: env.changes_detected == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "GitHub Action: Update datasets"
- name: Create Pull Request
if: steps.git-check.outputs.changes_detected == 'true'
if: env.changes_detected == 'true'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand Down

0 comments on commit 7e258fb

Please sign in to comment.