Skip to content

Commits not getting picked up #9

Description

@jakeols

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions