blob: bb9e7094ec103770a536f4260e8b229b4f0b1cf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
name: Tag Nightly Builds
on:
# schedule event triggers always run on the default branch
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
schedule:
- cron: "21 2 * * 2,4,6" # 2:21am UTC tues/thurs/sat == 7:21pm PDT mon/wed/fri -- see https://crontab.guru/#21_01_*_*_2,4,6
workflow_dispatch:
jobs:
tag-develop-nightly:
runs-on: ubuntu-latest
steps:
- name: Setup Date Env
run: |
echo NIGHTLY_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV}
- name: Update Tag
uses: actions/github-script@v7.0.1
if: ${{ secrets.GITHUB_NIGHTLY_TOKEN != "" }}
with:
github-token: ${{ secrets.GITHUB_NIGHTLY_TOKEN }}
script: |
github.rest.git.createRef(
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/Second_Life_Develop#${{ env.NIGHTLY_DATE }}",
sha: context.sha
)
|