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.
On the initial run where my built branch (
main-built) does not exist, everything works as expected. However, when adding subsequent commits tomain, the action is not committing them tomain-built. Am I misunderstanding any functionality here?Example
.yml:Log from my
.yml:Is this expected behavior? I had assumed that subsequent commits added to
mainwould be picked up bymain-built, but looking atentrypoint.shthat doesn't seem to be the case.edit: not sure if this change is the correct approach for solving this.