Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
halberom opened this issue Oct 13, 2021 · 1 comment

Comments

@halberom
Copy link

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.

@thomaseizinger
Copy link
Owner

Thanks and sorry for the late reply!

Your observation is correct :)
The post is a bit dated on that front. Will see to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants