Skip to content

Feedback re blog post - using-github-actions-to-automate-gitflow-style-releases #39

@halberom

Description

@halberom

Wasn't sure how to raise this with you, but one of your comments in https://blog.eizinger.io/12274/using-github-actions-to-automate-gitflow-style-releases is out of date / incorrect.

It is important to note that GitHub actions does not trigger events for actions that have been performed by a GitHub workflow. A GitHub workflow that pushes a branch (like in our case) will not trigger the push event. Unfortunately, that means we cannot use GitHub actions to build your release/* branches and we will have to use a 3rd party CI system like Travis, or CircleCI. ↩

The block on triggering events is only for secrets.GITHUB_TOKEN, and is intended to stop infinite events. You can get around this by using a PAT. See https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token

It's actually very simple using the checkout action, where

The auth token is persisted in the local git config

so no other config is needed for subsequent steps to trigger other workflows, E.g.

      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          token: ${{ secrets.SERVICE_USER_GITHUB_TOKEN }}

      - name: create release branch
        run: git checkout -b release/...

      - name: push release branch
        run: git push origin release/...

      # workflows that trigger on: push to release/* will run

ps. thanks very much for your blog and actions, they're very useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions