Automattic / action-commit-to-branch

GitHub action that will commit the result to an input branch
16 stars 19 forks source link

Commits not getting picked up #9

Open jakeols opened 3 years ago

jakeols commented 3 years ago

On the initial run where my built branch (main-built) does not exist, everything works as expected. However, when adding subsequent commits to main, the action is not committing them to main-built. Am I misunderstanding any functionality here?

Example .yml:

name: Build production to main-built
on:
  push:
    branches:
      - main
jobs:
  build_main_job:
    runs-on: ubuntu-latest
    name: Build production version of main to main-built branch
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v2
      - name: Push to built branch
        id: commit-and-push
        uses: Automattic/action-commit-to-branch@master
        with:
          branch: 'main-built'
          commit_message: 'Automated production build from main'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Log from my .yml:

Fetching origin
No local changes to save
Branch 'main-built' set up to track remote branch 'main-built' from 'origin'.
Switched to a new branch 'main-built'
No stash entries found.
On branch main-built
Your branch is up to date with 'origin/main-built'.

nothing to commit, working tree clean
Branch 'main-built' set up to track remote branch 'main-built' from 'origin'.
Everything up-to-date

Is this expected behavior? I had assumed that subsequent commits added to main would be picked up by main-built, but looking at entrypoint.sh that doesn't seem to be the case.

edit: not sure if this change is the correct approach for solving this.

remo285 commented 3 years ago

This is exactly what's happening to me, have you been able to fix this?

jakeols commented 3 years ago

This is exactly what's happening to me, have you been able to fix this?

Nope never ended up using this. Since this doesn't seem to be maintained anymore I'd likely just build a separate action based off the Automattic travis / circle setup