Replies: 1 comment 1 reply
-
This is a valid use case, but it’s outside the scope of what git-auto-commit-action is intended for. You don’t need this action to create and push a branch — GitHub Actions supports this natively with a few lines of shell. Here’s a minimal workflow that creates and pushes a release branch based on a tag, without committing anything: name: Create Release Branch
on:
release:
types: [published]
jobs:
create-release-branch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout tag
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Create and push release branch
run: |
BRANCH_NAME="release/${{ github.event.release.tag_name }}"
git checkout -b "$BRANCH_NAME"
git push origin "$BRANCH_NAME" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a scenario where I need to create release branches when a new release tag is created. I was wondering if this action supported creating and publishing a branch without having to commit any changes? I have the following workflow:
However, when I run the workflow, the auto commit step fails with the following logs:
Beta Was this translation helpful? Give feedback.
All reactions