Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Code freeze" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
type_of_release: | ||
type: choice | ||
description: Type of release | ||
options: | ||
- major | ||
- minor | ||
- pre_release | ||
mcore_version: | ||
description: 'Version of MCore to use (must be a valid git ref)' | ||
required: true | ||
type: string | ||
jobs: | ||
code-freeze: | ||
uses: NVIDIA/NeMo-FW-CI-templates/.github/workflows/_code_freeze.yml | ||
with: | ||
name_of_library: NeMo-Toolkit | ||
type_of_release: ${{ inputs.type_of_release }} | ||
python_package: nemo | ||
secrets: | ||
SLACK_RELEASE_ENDPOINT: ${{ secrets.SLACK_RELEASE_ENDPOINT }} | ||
freeze-tags: | ||
runs-on: ubuntu-latest | ||
needs: [code-freeze] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.run_id }} | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
ref: ${{ needs.code-freeze.outputs.release-branch }} | ||
token: ${{ secrets.PAT }} | ||
- name: Pin branch name in Notebooks | ||
run: | | ||
cd ${{ github.run_id }} | ||
find tutorials -type f -name "*.ipynb" -exec sed -i "s/BRANCH = 'main'/BRANCH = '${{ needs.code-freeze.outputs.release-branch }}'/g" {} + | ||
- name: Pin MCore in Dockerfile | ||
run: | | ||
cd ${{ github.run_id }} | ||
sed -i 's/^ARG MCORE_TAG=.*$/ARG MCORE_TAG=${{ inputs.mcore_version }}/' Dockerfile.ci | ||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v6 | ||
id: create-pull-request | ||
with: | ||
path: ${{ github.run_id }} | ||
base: ${{ needs.code-freeze.outputs.release-branch }} | ||
branch: ci/freeze-tags-${{ needs.code-freeze.outputs.release-branch }} | ||
title: 'Freeze tags in in `${{ needs.code-freeze.outputs.release-branch }}`' | ||
body: | | ||
🚀 PR to freeze tags in `${{ needs.code-freeze.outputs.release-branch }}`. | ||
commit-message: "[🤠]: Howdy folks, let's release NeMo `${{ needs.code-freeze.outputs.release-branch }}` !" | ||
signoff: true | ||
assignees: okoenig |