Skip to content

Commit

Permalink
Auto-merge updates from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 16, 2025
2 parents 5d25bf5 + dcd0c3e commit f924cbe
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@ env:
jobs:
format-code:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Retrieve secrets from Keeper
id: ksecrets
uses: Keeper-Security/ksm-action@master
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
secrets: |-
v2h4jKiZlJywDSoKzRMnRw/field/Access Token > env:PAT # Fetch PAT and store in environment variable
- name: Checkout code
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -58,15 +52,13 @@ jobs:
done
- name: Commit and push changes
env:
PAT: ${{ env.PAT }} # Use PAT fetched from Keeper
run: |
HAS_CHANGES=$(git diff --staged --name-only)
if [ ${#HAS_CHANGES} -gt 0 ]; then
git config --global user.name mlcommons-bot
git config --global user.email "mlcommons-[email protected]"
git config --global user.name github-actions[bot]
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Commit changes
git commit -m '[Automated Commit] Format Codebase'
# Use the PAT to push changes
git push https://x-access-token:${PAT}@github.com/${{ github.repository }} HEAD:${{ github.ref_name }}
# Use the GITHUB_TOKEN to push changes
git push
fi

0 comments on commit f924cbe

Please sign in to comment.