如何将GitHub工作流程调度到特定时区?

huangapple go评论52阅读模式
英文:

How can I schedule a GitHub workflow to a timezone

问题

我想安排一个GitHub工作流,每周三在阿姆斯特丹时间UTC+2的上午10:00开始工作。

我不知道如何做到这一点,我已经在许多地方搜索,但GitHub没有官方答案。

我正在寻找一个可行的解决方案。
这是我的代码:

name: Daily Hosting Release
on:
  schedule:
    - cron: '0 10 * * 3'
  workflow_dispatch:
env:
  CHANNEL: 'cloud'
  CHANGELOG_FILE: 'temp-changelog.txt'
英文:

I want to schedule a GitHub workflow time to work every Wednesday at 10:00 am Amsterdam time UTC+2.

I have no idea how to do this, I've searched many places but there is no official answer by GitHub.

I am looking for a working workaround.
This is my code:

name: Daily Hosting Release
    on:
      schedule:
        - cron: '0 10 * * 3'
      workflow_dispatch:
    env:
      CHANNEL: 'cloud'
      CHANGELOG_FILE: 'temp-changelog.txt'

答案1

得分: 2

目前不可能实现,关于此问题已经在 社区 - 在使用 cron 调度工作流运行时添加时区支持 上有一个讨论主题。

人们正在尝试在这个主题中寻找解决方法,但在我看来,在夏令时和冬令时可能不会奏效。

英文:

This is not possible currently and there is a topic for this on community - add timezone support to scheduling workflow runs with cron.

People ae trying to find workaround in this topic but IMHO it will not work with summer/winter time.

huangapple
  • 本文由 发表于 2023年7月12日 22:04:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/76671460.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定