DEV Community

Clavin June
Clavin June

Posted on • Originally published at clavinjune.dev on

Push Commit From Github Action

Sunday Snippet #14 push commit from github action

name: example
on: push
jobs:
  example:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - run: |
        git config --global user.name '<user.name>'
        git config --global user.email '<user.email>'
        git add .
        git commit -snm "<commit message>" || true
        git push origin <branch> || true
Enter fullscreen mode Exit fullscreen mode

Top comments (0)