22
22
required : true
23
23
default : ' true'
24
24
type : boolean
25
- head_branch :
26
- description : ' head branch for the release'
27
- required : true
28
- default : ' tmp-digest-sync-14488482962'
25
+ branch :
26
+ description : " Optional: Provide branch name"
27
+ required : false
29
28
type : string
30
- base_branch :
31
- description : ' Base branch for the release'
32
- required : true
33
- default : ' test'
29
+ user-hash :
30
+ description : " Optional: Specify a Git hash (it should exists on the branch history)"
31
+ required : false
34
32
type : string
35
33
36
34
env :
37
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38
35
RELEASE_TAG : ${{ github.event.inputs.tag }}
39
36
RELEASE_NAME : ${{ github.event.inputs.release_name }}
40
- BASE_BRANCH : ${{ github.event.inputs.base_branch }}
41
- HEAD_BRANCH : ${{ github.event.inputs.head_branch }}
42
- REPO_OWNER : mtchoum1
37
+ BRANCH : ${{ github.event.inputs.branch }}
38
+ USER_HASH : ${{ github.event.inputs.user-hash }}
39
+ REPO_OWNER : opendatahub-io
43
40
REPO_NAME : notebooks
44
41
VERSION : ${{ github.event.inputs.buildconfigs_version}}
45
42
46
43
jobs :
47
44
# 1. Update the params.env and commit.env files with new SHAs
48
45
Update-manifests :
49
- if : github.event_name == 'workflow_dispatch'
50
- runs-on : ubuntu-latest
51
- permissions :
52
- contents : write
53
- pull-requests : write
54
- steps :
55
- - name : Check out repository
56
- uses : actions/checkout@v4
57
- with :
58
- fetch-depth : 0
59
-
60
- - name : Configure Git
61
- run : |
62
- git config user.name "GitHub Actions"
63
- git config user.email "github-actions[bot]@users.noreply.github.com"
64
-
65
- - name : Create Target Branch
66
- run : |
67
- git checkout -b $BASE_BRANCH
68
- git push origin $BASE_BRANCH
69
-
70
- - name : create pull request
71
- run : |
72
- gh pr create -B $BASE_BRANCH -H $HEAD_BRANCH --title "$PR_TITLE" --body "$PR_BODY"
73
- env :
74
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75
- PR_TITLE : " [Updater Action] Update Notebook and Runtime Images as well as the Commits With New SHAs"
76
- PR_BODY : |
77
- :rocket: This is an automated Pull Request.
78
- Created by `/.github/workflows/notebooks-digest-updater.yaml`
79
- - `manifests/base/params.env` file with the latest updated SHA digests of the notebooks.
80
- - `manifests/base/runtime-*.yamls` file with the latest updated SHA digests of the runtimes.
81
- - `manifests/base/commit.env` file with the latest commit.
46
+ uses : opendatahub-io/notebooks/.github/workflows/notebooks-digest-updater.yaml@main
47
+ with :
48
+ branch : ${{ github.event.inputs.branch }}
49
+ user-hash : ${{ github.event.inputs.user_hash }}
82
50
83
51
# 2. Check if the Manifest PR is merged
84
52
Manifests-merged :
@@ -135,9 +103,9 @@ jobs:
135
103
# 3. Update the BuildConfigs for CUDA RStudio and RStudio
136
104
Update-buildConfigs :
137
105
if : github.event.inputs.update_buildconfigs == 'true'
138
- uses : ./ .github/workflows/update-buildconfigs.yaml
106
+ uses : opendatahub-io/notebooks/ .github/workflows/update-buildconfigs.yaml@main
139
107
with :
140
- branch : ${{ github.event.inputs.base_branch }}
108
+ branch : ${{ github.event.inputs.branch }}
141
109
version : ${{ github.event.inputs.buildconfigs_version }}
142
110
143
111
# 4. Check if the BuildConfigs PR is merged
@@ -208,7 +176,7 @@ jobs:
208
176
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
209
177
working-directory : ${{env.GITHUB_WORKSPACE}}
210
178
run : |
211
- gh release create "$RELEASE_TAG" --title="$RELEASE_NAME-$RELEASE_TAG" --generate-notes --target $BASE_BRANCH
179
+ gh release create "$RELEASE_TAG" --title="$RELEASE_NAME-$RELEASE_TAG" --generate-notes --target $BRANCH
212
180
213
181
# 6. Generate the release without BuildConfigs
214
182
Generate-release :
@@ -225,4 +193,4 @@ jobs:
225
193
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
226
194
working-directory : ${{env.GITHUB_WORKSPACE}}
227
195
run : |
228
- gh release create "$RELEASE_TAG" --title="$RELEASE_NAME-$RELEASE_TAG" --generate-notes --target $BASE_BRANCH
196
+ gh release create "$RELEASE_TAG" --title="$RELEASE_NAME-$RELEASE_TAG" --generate-notes --target $BRANCH
0 commit comments