Skip to content

Git Commit and Push w/ Force Push

Actions
Commits any changed files and pushes (with force option) the result back to origin branch
0.0.1
LatestPre-release
Star (1)

commit

Git commit and push

Example

name: publish

on:
  push:
    branches:
    - master
    
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: checkout
      uses: actions/checkout@master
      with:
        ref: master
    - name: build
      uses: github-actions-x/hugo@master
    - name: push
      uses: dciborow/[email protected]
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        push-branch: 'master'
        commit-message: 'publish'
        force-add: 'true'
        force-push: 'true'
        files: a.txt b.txt c.txt dirA/ dirB/ dirC/a.txt
        name: commiter name
        email: [email protected] 

If you use commit inside matrix, set variable rebase='true' for pulling and rebasing changes.

name: Node CI

on:
  push:
    branches:
    - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version:
          - 10.x
          - 12.x
    steps:
      - uses: actions/checkout@v1
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: generate benchmarks
        run: |
          npm run generate-some-files-for-specific-node-version
      - name: push
        uses: dciborow/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          push-branch: master
          commit-message: '${{ matrix.node-version }} adds auto-generated benchmarks and bar graph'
          rebase: 'true' # pull abd rebase before commit

Git Commit and Push w/ Force Push is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Commits any changed files and pushes (with force option) the result back to origin branch
0.0.1
LatestPre-release

Git Commit and Push w/ Force Push is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.