Skip to content

Commit

Permalink
Nightly builds for vision and audio
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Jul 12, 2023
1 parent 3d521e6 commit d706c39
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 18 deletions.
34 changes: 34 additions & 0 deletions .github/actions/trigger-nightly/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Trigger nightly builds

inputs:
github-secret:
description: GitHub token
required: true
repository:
required: true
description: 'Which repo to checkout'
default: false
branch:
description: Branch to cut from
required: true

jobs:
nightly:
name: Trigger nightly build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
repository: ${{ inputs.repository }}
token: ${{ inputs.github-secret }}
- run: |
git config --global user.email "pytorchbot@pytorch.com"
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"
39 changes: 21 additions & 18 deletions .github/workflows/trigger_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,24 @@ jobs:
tag_nightly_text:
if: ${{ github.event_name == 'schedule' || inputs.domain == 'text' || inputs.domain == 'all' }}
name: Trigger nightly text build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
repository: pytorch/text
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
- run: |
git config --global user.email "pytorchbot@pytorch.com"
git config --global user.name "pytorchbot"
git checkout origin/main
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"
uses: ./test-infra/.github/actions/trigger-nightly
with:
ref: main
repository: pytorch/text
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
tag_nightly_vision:
if: ${{ github.event_name == 'schedule' || inputs.domain == 'vision' || inputs.domain == 'all' }}
name: Trigger nightly vision build
uses: ./test-infra/.github/actions/trigger-nightly
with:
ref: main
repository: pytorch/vision
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
tag_nightly_audio:
if: ${{ github.event_name == 'schedule' || inputs.domain == 'audio' || inputs.domain == 'all' }}
name: Trigger nightly audio build
uses: ./test-infra/.github/actions/trigger-nightly
with:
ref: main
repository: pytorch/audio
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}

0 comments on commit d706c39

Please sign in to comment.