Skip to content

Update quick start module #1003

Update quick start module

Update quick start module #1003

name: Update quick start module
on:
schedule:
# At 18:30 pm UTC (1:30 pm EST)
- cron: "30 18 * * *"
pull_request:
paths:
- .github/workflows/update-quick-start-module.yml
- scripts/gen_quick_start_module.py
- _includes/quick-start-module.js
- _includes/quick_start_local.html
push:
branches:
site
paths:
- .github/workflows/update-quick-start-module.yml
- scripts/gen_quick_start_module.py
- _includes/quick-start-module.js
- _includes/quick_start_local.html
workflow_dispatch:
jobs:
linux-nightly-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: linux
channel: "nightly"
windows-nightly-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: windows
channel: "nightly"
macos-arm64-nightly-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: macos-arm64
channel: "nightly"
linux-release-matrix:
needs: [linux-nightly-matrix]
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: linux
channel: "release"
windows-release-matrix:
needs: [windows-nightly-matrix]
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: windows
channel: "release"
macos-arm64-release-matrix:
needs: [macos-arm64-nightly-matrix]
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: macos-arm64
channel: "release"
update-quick-start:
needs: [linux-nightly-matrix, windows-nightly-matrix, macos-arm64-nightly-matrix,
linux-release-matrix, windows-release-matrix, macos-arm64-release-matrix]
runs-on: "ubuntu-20.04"
environment: pytorchbot-env
steps:
- name: Checkout builder
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Create json file
shell: bash
env:
LINUX_NIGHTLY_MATRIX: ${{ needs.linux-nightly-matrix.outputs.matrix }}
WINDOWS_NIGHTLY_MATRIX: ${{ needs.windows-nightly-matrix.outputs.matrix }}
MACOS_NIGHTLY_MATRIX: ${{ needs.macos-arm64-nightly-matrix.outputs.matrix }}
LINUX_RELEASE_MATRIX: ${{ needs.linux-release-matrix.outputs.matrix }}
WINDOWS_RELEASE_MATRIX: ${{ needs.windows-release-matrix.outputs.matrix }}
MACOS_RELEASE_MATRIX: ${{ needs.macos-arm64-release-matrix.outputs.matrix }}
run: |
set -ex
printf '%s\n' "$LINUX_NIGHTLY_MATRIX" > linux_nightly_matrix.json
printf '%s\n' "$WINDOWS_NIGHTLY_MATRIX" > windows_nightly_matrix.json
printf '%s\n' "$MACOS_NIGHTLY_MATRIX" > macos_nightly_matrix.json
printf '%s\n' "$LINUX_RELEASE_MATRIX" > linux_release_matrix.json
printf '%s\n' "$WINDOWS_RELEASE_MATRIX" > windows_release_matrix.json
printf '%s\n' "$MACOS_RELEASE_MATRIX" > macos_release_matrix.json
python3 ./scripts/gen_quick_start_module.py --autogenerate > assets/quick-start-module.js
rm *_matrix.json
- name: Create Issue if failed
uses: dacbd/create-issue-action@main
if: ${{ failure() }} # only run when this job is failed.
with:
title: Updating quick start module failed
token: ${{secrets.PYTORCHBOT_TOKEN}}
assignees: ${{github.actor}}
labels: bug
body: Updating quick start module failed, please fix update quick start module
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PYTORCHBOT_TOKEN }}
commit-message: Modify published_versions.json file
title: '[Getting Started Page] Modify published_versions.json file'
body: >
This PR is auto-generated. It updates Getting Started page
labels: automated pr