forked from pytorch/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (27 loc) · 914 Bytes
/
nightlies.yml
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
29
name: Cut Nightly
on:
schedule:
- cron: '30 9 * * *'
workflow_dispatch:
jobs:
cut_nightly:
runs-on: ubuntu-latest
environment: trigger-nightly
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
- name: Create nightly commit
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "pytorchbot"
git fetch origin nightly
HEAD_COMMIT_HASH=$(git rev-parse HEAD)
NIGHTLY_DATE=$(date +"%Y-%m-%d")
# shellcheck disable=SC1083
NIGHTLY_RELEASE_COMMIT=$(git commit-tree -p FETCH_HEAD HEAD^{tree} -m "${NIGHTLY_DATE} nightly release (${HEAD_COMMIT_HASH})")
# shellcheck disable=SC1083
git push -f origin "${NIGHTLY_RELEASE_COMMIT}:nightly"