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

Schedule event only targetting PR's on main branch #356

Open
andynicklen opened this issue Dec 21, 2022 · 0 comments
Open

Schedule event only targetting PR's on main branch #356

andynicklen opened this issue Dec 21, 2022 · 0 comments
Assignees

Comments

@andynicklen
Copy link

Hi,

When using the schedule event as the workflow trigger, should it target all PR's, or only PR's on the main branch? As you can see below it's only targeting develop (our main branch).

image

Here's my workflow:

name: auto-update
run-name: auto-update (${{github.event.schedule}})

on:
  schedule:
    - cron: '39 * * * 1-5' # every weekday hour
    - cron: '5 6 * * 1-5' # every weekday

jobs:
  autoupdate:
    name: auto-update
    runs-on: ubuntu-18.04
    steps:
      - name: auto-update-1h
        if: github.event.schedule == '39 * * * 1-5'
        uses: docker://chinthakagodawita/autoupdate-action:v1
        env:
          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
          DRY_RUN: 'false'
          PR_FILTER: 'labelled'
          PR_LABELS: 'auto_update_1h'
          MERGE_MSG: 'auto-update from base'
          RETRY_COUNT: '5'
          RETRY_SLEEP: '300'
          MERGE_CONFLICT_ACTION: 'ignore'
      - name: auto-update-1d
        if: github.event.schedule == '5 6 * * 1-5'
        uses: docker://chinthakagodawita/autoupdate-action:v1
        env:
          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
          DRY_RUN: 'false'
          PR_FILTER: 'labelled'
          PR_LABELS: 'auto_update_1d'
          MERGE_MSG: 'auto-update from base'
          RETRY_COUNT: '5'
          RETRY_SLEEP: '300'
          MERGE_CONFLICT_ACTION: 'ignore'

Thanks

@chinthakagodawita chinthakagodawita self-assigned this Mar 26, 2023
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