Skip to content

Commit bf4e3e8

Browse files
authored
Merge pull request #40067 from github/repo-sync
Repo sync
2 parents 0e00f9f + 2431a1b commit bf4e3e8

File tree

12 files changed

+65
-69
lines changed

12 files changed

+65
-69
lines changed

content/actions/concepts/workflows-and-actions/notifications-for-workflow-runs.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ redirect_from:
1010
- /actions/monitoring-and-troubleshooting-workflows/monitoring-workflows/notifications-for-workflow-runs
1111
---
1212

13-
{% data reusables.actions.enterprise-github-hosted-runners %}
13+
If you enable email or web notifications for {% data variables.product.prodname_actions %}, you'll receive a notification when any workflow runs that you've triggered have completed. The notification will include the workflow run's status (including successful, failed, neutral, and canceled runs). You can also choose to receive a notification only when a workflow run has failed. For more information about enabling or disabling notifications, see [AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications).
1414

15-
{% data reusables.repositories.workflow-notifications %}
15+
Notifications for scheduled workflows are sent to the user who initially created the workflow.
16+
* If a different user updates the cron syntax, in the `schedule` event in the workflow file, subsequent notifications will be sent to that user instead.
17+
* If a scheduled workflow is disabled and then re-enabled, notifications will be sent to the user who re-enabled the workflow rather than the user who last modified the cron syntax.
18+
19+
You can also see the status of workflow runs on a repository's Actions tab. For more information, see [AUTOTITLE](/actions/managing-workflow-runs).

content/actions/reference/workflows-and-actions/events-that-trigger-workflows.md

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -966,58 +966,44 @@ jobs:
966966

967967
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
968968
| --------------------- | -------------- | ------------ | -------------|
969-
| Not applicable | Not applicable | Last commit on default branch | Default branch | When the scheduled workflow is set to run. A scheduled workflow uses [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). For more information, see [AUTOTITLE](/actions/using-workflows#triggering-a-workflow-with-events). |
969+
| Not applicable | Not applicable | Last commit on default branch | Default branch |
970970

971971
> [!NOTE]
972972
> * {% data reusables.actions.schedule-delay %}
973-
> * This event will only trigger a workflow run if the workflow file is on the default branch.
973+
> * {% data reusables.actions.branch-requirement %}
974974
> * Scheduled workflows will only run on the default branch.
975975
> * In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days. For information on re-enabling a disabled workflow, see [AUTOTITLE](/enterprise-server/actions/using-workflows/disabling-and-enabling-a-workflow#enabling-a-workflow).
976-
> * For an enterprise with {% data variables.product.prodname_emus %}, scheduled workflows will not run if the last `actor` associated with the scheduled workflow has been deprovisioned (and therefore become suspended) by the {% data variables.product.prodname_emu %} identity provider (IdP). However, if the last `actor` {% data variables.product.prodname_emu %} has not been deprovisioned by the IdP, and has only been removed as a member from a given organization in the enterprise, scheduled workflows will still run with that user set as the `actor`. Similarly, for an enterprise without {% data variables.product.prodname_emus %}, removing a user from an organization will not prevent scheduled workflows which had that user as their `actor` from running. Essentially, triggering a scheduled workflow requires that the status of the `actor` user account associated with the workflow is currently active (i.e. not suspended or deleted). Thus, the _user account's_ status, in both {% data variables.product.prodname_emu %} and non-{% data variables.product.prodname_emu %} scenarios, is what's important, _not_ the user's _membership status_ in the organization where the scheduled workflow is located.
977-
> * Certain repository events change the `actor` associated with the workflow. For example, a user who changes the default branch of the repository, which changes the branch on which scheduled workflows run, becomes `actor` for those scheduled workflows.
978-
> * For a deactivated scheduled workflow, if a user with `write` permissions to the repository makes a commit that changes the `cron` schedule on the workflow, the workflow will be reactivated, and that user will become the `actor` associated with any workflow runs. Note that, in this situation, the workflow is not reactivated by any change to the workflow file; you must alter the `cron` value in the workflow and commit this change.
979-
>
980-
> **Example:**
981-
>
982-
> ```yaml
983-
> on:
984-
> schedule:
985-
> - cron: "15 4,5 * * *" # <=== Change this value
986-
> ```
987976

988977
The `schedule` event allows you to trigger a workflow at a scheduled time.
989978

990-
{% data reusables.repositories.actions-scheduled-workflow-example %}
991-
992-
Cron syntax has five fields separated by a space, and each field represents a unit of time.
993-
994-
```text
995-
┌───────────── minute (0 - 59)
996-
│ ┌───────────── hour (0 - 23)
997-
│ │ ┌───────────── day of the month (1 - 31)
998-
│ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
999-
│ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
1000-
│ │ │ │ │
1001-
│ │ │ │ │
1002-
│ │ │ │ │
1003-
* * * * *
1004-
```
979+
**Example:**
1005980

1006-
You can use these operators in any of the five fields:
981+
```yaml
982+
on:
983+
schedule:
984+
- cron: "15 4,5 * * *"
985+
```
1007986

1008-
| Operator | Description | Example |
1009-
| -------- | ----------- | ------- |
1010-
| * | Any value | `15 * * * *` runs at every minute 15 of every hour of every day. |
1011-
| , | Value list separator | `2,10 4,5 * * *` runs at minute 2 and 10 of the 4th and 5th hour of every day. |
1012-
| - | Range of values | `30 4-6 * * *` runs at minute 30 of the 4th, 5th, and 6th hour. |
1013-
| / | Step values | `20/15 * * * *` runs every 15 minutes starting from minute 20 through 59 (minutes 20, 35, and 50). |
987+
{% data reusables.repositories.actions-scheduled-workflow-example %}
1014988

1015989
> [!NOTE]
1016990
> {% data variables.product.prodname_actions %} does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`.
1017991

1018992
You can use [crontab guru](https://crontab.guru/) to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of [crontab guru examples](https://crontab.guru/examples.html).
1019993

1020-
Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file. For more information, see [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs).
994+
### `actor` for scheduled workflows
995+
996+
Certain repository events change the `actor` associated with the workflow. For example, a user who changes the default branch of the repository, which changes the branch on which scheduled workflows run, becomes `actor` for those scheduled workflows.
997+
998+
For a deactivated scheduled workflow, if a user with `write` permissions to the repository makes a commit that changes the `cron` schedule on the workflow, the workflow will be reactivated, and that user will become the `actor` associated with any workflow runs.
999+
1000+
Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file. For more information, see [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs).
1001+
1002+
> [!NOTE]
1003+
> For an enterprise with {% data variables.product.prodname_emus %}, triggering a scheduled workflow requires that the status of the `actor` user account associated with the workflow is currently active (i.e. not suspended or deleted).
1004+
> * Scheduled workflows will not run if the last `actor` associated with the scheduled workflow has been deprovisioned by the {% data variables.product.prodname_emu %} identity provider (IdP). However, if the last `actor` {% data variables.product.prodname_emu %} has not been deprovisioned by the IdP, and has only been removed as a member from a given organization in the enterprise, scheduled workflows will still run with that user set as the `actor`.
1005+
> * Similarly, for an enterprise without {% data variables.product.prodname_emus %}, removing a user from an organization will not prevent scheduled workflows which had that user as their `actor` from running.
1006+
> * Thus, the _user account's_ status, in both {% data variables.product.prodname_emu %} and non-{% data variables.product.prodname_emu %} scenarios, is what's important, _not_ the user's _membership status_ in the organization where the scheduled workflow is located.
10211007

10221008
## `status`
10231009

content/actions/reference/workflows-and-actions/workflow-syntax.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}
107107

108108
## `on.schedule`
109109

110-
{% data reusables.actions.workflows.section-triggering-a-workflow-schedule %}
110+
You can use `on.schedule` to define a time schedule for your workflows.
111+
112+
{% data reusables.repositories.actions-scheduled-workflow-example %}
113+
114+
For more information about `schedule` events, see [AUTOTITLE](/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule).
111115

112116
## `on.workflow_call`
113117

content/actions/tutorials/migrate-to-github-actions/manual-migrations/migrate-from-jenkins.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ on:
126126
- cron: '*/15 * * * 1-5'
127127
```
128128
129+
For more information about `schedule` events and accepted cron syntax, see [AUTOTITLE](/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule).
130+
129131
### Configuring environment variables in a pipeline
130132

131133
#### Jenkins pipeline with an environment variable

content/actions/tutorials/use-actions-runner-controller/deploy-runner-scale-sets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ ARC supports using anonymous or authenticated proxies. If you use authenticated
249249
The `maxRunners` and `minRunners` properties provide you with a range of options to customize your ARC setup.
250250

251251
> [!NOTE]
252-
> ARC does not support scheduled maximum and minimum configurations. You can use a cronjob or any other scheduling solution to update the configuration on a schedule.
252+
> ARC does not support scheduled maximum and minimum configurations. You can use a cron job or any other scheduling solution to update the configuration on a schedule.
253253

254254
#### Example: Unbounded number of runners
255255

content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ For more information about using `on:pull_request:paths-ignore` and `on:pull_req
103103

104104
### Scanning on a schedule
105105

106-
If you use the default {% data variables.code-scanning.codeql_workflow %}, the workflow will scan the code in your repository once a week, in addition to the scans triggered by events. To adjust this schedule, edit the `cron` value in the workflow. For more information, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onschedule).
106+
If you use the default {% data variables.code-scanning.codeql_workflow %}, the workflow will scan the code in your repository once a week, in addition to the scans triggered by events. To adjust this schedule, edit the `cron` value for the `on.schedule` event in the workflow. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-syntax#onschedule).
107107

108108
> [!NOTE]
109-
> {% data variables.product.prodname_dotcom %} only runs scheduled jobs that are in workflows on the default branch. Changing the schedule in a workflow on any other branch has no effect until you merge the branch into the default branch.
109+
> {% data reusables.actions.branch-requirement %}
110110

111111
### Example
112112

content/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ There are a couple of customization options you can implement to optimize {% dat
2727

2828
## Controlling the frequency and timings of dependency updates
2929

30-
{% data variables.product.prodname_dependabot %} runs its checks for version updates at a frequency set by you in the configuration file, where the required field, `schedule.interval`, must be set to `daily`, `weekly`, `monthly`, `quarterly`, `semiannually`, `yearly`, or `cron` (see [cronjob](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#cronjob)).
30+
{% data variables.product.prodname_dependabot %} runs its checks for version updates at a frequency set by you in the configuration file, where the required field, `schedule.interval`, must be set to `daily`, `weekly`, `monthly`, `quarterly`, `semiannually`, `yearly`, or `cron` (see [`cronjob`](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#cronjob)).
3131

3232
By default, {% data variables.product.prodname_dependabot %} balances its workload by assigning a random time to check and raise pull requests for dependency updates.
3333

content/code-security/dependabot/working-with-dependabot/dependabot-options-reference.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -634,16 +634,11 @@ Optionally, run all updates for a package manager at a specific time of day. By
634634

635635
### `cronjob`
636636

637-
Supported values: Valid cron expression in cron format or natural expression.
637+
Supported values: Valid cron expression in cron syntax or natural expression.
638638

639-
Examples : `0 9 * * *`, `every day at 5pm`
639+
{% data reusables.repositories.cron %}
640640

641-
cron format is defined as the following:
642-
* `*` The minute field.
643-
* `*` The hour field (in 24-hour time).
644-
* `*` The day of the month (matches any day of the month).
645-
* `*` The month (matches any month).
646-
* `*` The day of the week (matches any day of the week).
641+
Examples : `0 9 * * *`, `every day at 5pm`
647642

648643
`0 9 * * *` is equivalent to "every day at 9am". `every day at 5pm` is equivalent to `0 17 * * *`.
649644

data/reusables/actions/workflows/section-triggering-a-workflow-schedule.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

data/reusables/repositories/actions-scheduled-workflow-example.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
You can schedule a workflow to run at specific UTC times using [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.
1+
Use [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) to schedule workflows to run at specific UTC times. Scheduled workflows run on the latest commit on the default branch. The shortest interval you can run scheduled workflows is once every 5 minutes.
22

3-
This example triggers the workflow every day at 5:30 and 17:30 UTC:
3+
{% data reusables.repositories.cron %}
44

5-
```yaml
6-
on:
7-
schedule:
8-
# * is a special character in YAML so you have to quote this string
9-
- cron: '30 5,17 * * *'
10-
```
5+
You can use these operators in any of the five fields:
6+
7+
| Operator | Description | Example |
8+
| -------- | ----------- | ------- |
9+
| * | Any value | `15 * * * *` runs at every minute 15 of every hour of every day. |
10+
| , | Value list separator | `2,10 4,5 * * *` runs at minute 2 and 10 of the 4th and 5th hour of every day. |
11+
| - | Range of values | `30 4-6 * * *` runs at minute 30 of the 4th, 5th, and 6th hour. |
12+
| / | Step values | `20/15 * * * *` runs every 15 minutes starting from minute 20 through 59 (minutes 20, 35, and 50). |
1113

12-
A single workflow can be triggered by multiple `schedule` events. You can access the schedule event that triggered the workflow through the `github.event.schedule` context. This example triggers the workflow to run at 5:30 UTC every Monday-Thursday, but skips the `Not on Monday or Wednesday` step on Monday and Wednesday.
14+
A single workflow can be triggered by multiple `schedule` events. Access the `schedule` event that triggered the workflow through the `github.event.schedule` context. This example triggers the workflow to run at 5:30 UTC every Monday-Thursday, and 17:30 UTC on Tuesdays and Thursdays, but skips the `Not on Monday or Wednesday` step on Monday and Wednesday.
1315

1416
```yaml
1517
on:
1618
schedule:
1719
- cron: '30 5 * * 1,3'
18-
- cron: '30 5 * * 2,4'
20+
- cron: '30 5,17 * * 2,4'
1921

2022
jobs:
2123
test_schedule:

0 commit comments

Comments
 (0)