Skip to content

Commit

Permalink
Merge pull request #67 from systemphil/fix/ci-checks2
Browse files Browse the repository at this point in the history
fix ci-check2
  • Loading branch information
Firgrep authored Aug 18, 2024
2 parents de10938 + 723a713 commit a120cc3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/verify_formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

11 changes: 11 additions & 0 deletions logs/deprecated/workflow_experiments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a120cc3

Please sign in to comment.