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

Checkout ref (branch) ignored for cron schedule trigger #1764

Open
theoturner opened this issue Jun 5, 2024 · 0 comments
Open

Checkout ref (branch) ignored for cron schedule trigger #1764

theoturner opened this issue Jun 5, 2024 · 0 comments

Comments

@theoturner
Copy link

theoturner commented Jun 5, 2024

If an on: schedule: cron is used, the checkout action will always pull the default branch. Minimal example:

name: Checkout non default branch
on:
  schedule:
    - cron: "0 * * * *"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repo
        uses: actions/checkout@v4
        with:
          ref: non_default_branch

From action runs we can see the default branch is used, ignoring the ref.

The workflow_dispatch and on: push work as expected with the specified branch used.

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

1 participant