Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# see list of approvers in OWNERS file
environment:
${{ (github.event.pull_request.head.repo.full_name == github.repository ||
contains(fromJSON('["coreydaley","gazarenkov","kadel","nickboldt","rm3l","kim-tsao","Fortune-Ndlovu","subhashkhileri","zdrapela","openshift-cherrypick-robot", "Fortune-Ndlovu", "subhashkhileri", "zdrapela"]'), github.event.pull_request.user.login)) && 'internal' || 'external' }}
contains(fromJSON('["gazarenkov","kadel","nickboldt","rm3l","kim-tsao","Fortune-Ndlovu","subhashkhileri","zdrapela","openshift-cherrypick-robot"]'), github.event.pull_request.user.login)) && 'internal' || 'external' }}
runs-on: ubuntu-latest
steps:
- name: approved
Expand Down Expand Up @@ -66,18 +66,22 @@
run: |
echo "CHANGED=$(if git diff --quiet; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT

- name: Commit any changes
- name: Commit and push any manifest changes
if: ${{ steps.diff-checker.outputs.CHANGED == 'true' }}
run: |
git remote add fork "https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git"
git fetch fork ${{ github.event.pull_request.head.ref }}
Comment thread Dismissed
git checkout -B pr-branch fork/${{ github.event.pull_request.head.ref }}
Comment thread Dismissed

git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git fetch --prune
git pull --rebase --autostash

git add -A .
git commit \
Comment thread
rm3l marked this conversation as resolved.
-m "chore(pre-commit): Auto-fix hooks" \
-m "Co-authored-by: $GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>"
git push

git push fork pr-branch:${{ github.event.pull_request.head.ref }}
Comment thread Dismissed

- name: Comment on PR if manifests were updated
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
Expand Down
Loading