-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from systemphil/fix/ci-checks2
fix ci-check2
- Loading branch information
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,15 +35,18 @@ jobs: | |
- name: Run Prettier (specific version) | ||
run: | | ||
npx --yes prettier@$PRETTIER_VERSION --config .prettierrc --write . | ||
npx --yes prettier@$PRETTIER_VERSION --check --config .prettierrc --write . | ||
- name: Check for changes | ||
id: check-changes | ||
- name: Check for Prettier Changes | ||
id: prettier-changes | ||
run: | | ||
git config --global user.name "sPhil_PR_quality_ctl" | ||
git config --global user.email "[email protected]" | ||
if [[ `git status --porcelain` ]]; then | ||
git add . | ||
git commit -m "ci: format code [automated action on behalf of ${{ github.event.pull_request.user.login }}]" | ||
git push origin HEAD:${{ github.event.pull_request.head.ref }} | ||
fi | ||
echo "has_changes=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT | ||
- name: Add and commit changes | ||
uses: EndBug/add-and-commit@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
message: 'ci: format code [automated action on behalf of ${{ github.event.pull_request.user.login }}]' | ||
if: steps.prettier-changes.outputs.has_changes != '0' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,3 +107,14 @@ jobs: | |
if: always() | ||
|
||
# head_sha: '${{ github.event.inputs.pr_id }}', | ||
|
||
# - name: Check for changes (using git - this will make "github_actions" the author) | ||
id: check-changes | ||
run: | | ||
git config --global user.name "sPhil_PR_quality_ctl" | ||
git config --global user.email "[email protected]" | ||
if [[ `git status --porcelain` ]]; then | ||
git add . | ||
git commit -m "ci: format code [automated action on behalf of ${{ github.event.pull_request.user.login }}]" | ||
git push origin HEAD:${{ github.event.pull_request.head.ref }} | ||
fi |