Skip to content

github.rest.git.createRef does not trigger other workflows #491

@RobertoRoos

Description

@RobertoRoos

Describe the bug
When pushing a new tag with github.rest.git.createRef on a scheduled job, the tag is successfully created but other workflows that should be triggered by a new tag are not.

To Reproduce
I have a scheduled job like this:

on:
    schedule:
        - cron: "49 5 * * *"

jobs:
    find_releases:
        name: Find releases
        runs-on: ubuntu-latest

        steps:

            - uses: actions/github-script@v7
              with:
                  script: |
                      // ...
                      const result_ref = await github.rest.git.createRef({
                          owner: context.repo.owner,
                          repo: context.repo.repo,
                          ref: "refs/tags/" + "v0.0.1",
                          sha: context.sha
                      })

And a build job like this:

on: push

jobs:
  build_wheels:
    steps:
      - uses: actions/checkout@v4
      - <build step>

  publish:
    runs-on: ubuntu-latest
    if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
    steps:
      - <publish step>

Expected behavior
I would expect the tag to be created on the schedule, after which a build and a corresponding publish is triggered.

Desktop (please complete the following information):

  • OS: Github Workflow
  • Version v7

The scheduled workflow run from this morning: https://github.com/RobertoRoos/protobuf-protoc-bin/actions/runs/11249037881/job/31275208574
All workflows for that version: https://github.com/RobertoRoos/protobuf-protoc-bin/tree/c737e636f6fbfc626cbcb207d77af7713db50bda/.github/workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions