-
Notifications
You must be signed in to change notification settings - Fork 2.7k
81 lines (73 loc) · 2.58 KB
/
release-freeze.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: "Code freeze"
on:
workflow_dispatch:
inputs:
type_of_release:
type: choice
description: Type of release
options:
- major
- minor
freeze-commit:
type: string
description: Commit SHA to use for cut-off
required: false
default: main
mcore_version:
description: "Version of MCore to use (must be a valid git ref)"
required: true
type: string
dry-run:
type: boolean
description: Dry-run of code-freeze
required: false
default: true
jobs:
code-freeze:
uses: NVIDIA/NeMo-FW-CI-templates/.github/workflows/[email protected]
with:
library-name: NeMo-Toolkit
python-package: nemo
release-type: ${{ inputs.type_of_release }}
freeze-commit: ${{ inputs.freeze-commit }}
dry-run: ${{ inputs.dry-run }}
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASE_ENDPOINT }}
SLACK_WEBHOOK_ADMIN: ${{ secrets.SLACK_WEBHOOK_ADMIN }}
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: ${{ inputs.dry-run == true && inputs.freeze-commit || needs.code-freeze.outputs.release-branch }}
- 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: Show status
run: |
cd ${{ github.run_id }}
git status
- name: Create PR
uses: peter-evans/create-pull-request@v6
id: create-pull-request
if: ${{ inputs.dry-run != true }}
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