tweak commit step for debugging

This commit is contained in:
Luke Francl 2021-10-08 14:27:46 -07:00
parent 8b3fc58258
commit 202ca6a675

View File

@ -46,16 +46,22 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
echo "git current state:"
git status
if [[ -n "$(git status --porcelain)" ]]; then if [[ -n "$(git status --porcelain)" ]]; then
echo "Creating Linguist update commit"
git config user.name github-actions git config user.name github-actions
git config user.email github-actions@github.com git config user.email github-actions@github.com
git add . git add .
git commit -m "Updated Linguist to ${{ steps.linguist-release.outputs.linguist_version }}" git commit -m "Updated Linguist to ${{ steps.linguist-release.outputs.linguist_version }}"
git push --set-upstream origin ${{ steps.branch.outputs.branch_name }} git push --set-upstream origin ${{ steps.branch.outputs.branch_name }}
echo "::set-output name=needs_pr::true" echo "::set-output name=needs_pr::true"
else exit 0
echo "::set-output name=needs_pr::false"
fi fi
echo "Linguist update unncessary"
echo "::set-output name=needs_pr::false"
- name: Create Pull Request - name: Create Pull Request
id: open-pr id: open-pr
uses: repo-sync/pull-request@v2 uses: repo-sync/pull-request@v2
@ -67,6 +73,6 @@ jobs:
if: ${{ steps.commit.needs_pr == 'true' }} if: ${{ steps.commit.needs_pr == 'true' }}
run: echo ${{ steps.open-pr.outputs.pr_url }} run: echo ${{ steps.open-pr.outputs.pr_url }}
- name: No PR Created - name: No PR Created
if: ${{ steps.commit.needs_pr == 'false' }} if: ${{ steps.commit.needs_pr != 'true' }}
run: echo "No changes for ${{ steps.linguist-release.outputs.linguist_version }}" run: echo "No changes for ${{ steps.linguist-release.outputs.linguist_version }}"