Skip to content

Commit 59ca3cd

Browse files
sutaakarBobbins228
authored andcommitted
CARRY: Add workflow to release ODH/Kuberay with compiled test binaries
1 parent c338e54 commit 59ca3cd

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/odh-release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow will compile e2e tests and release them
2+
3+
name: ODH Release
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: 'Tag to be used for release, i.e.: v0.0.1'
9+
required: true
10+
push:
11+
tags:
12+
- '*'
13+
14+
env:
15+
KUBERAY_RELEASE_VERSION: ${{ github.event.inputs.version || github.ref_name }}
16+
17+
jobs:
18+
release-odh:
19+
runs-on: ubuntu-latest
20+
21+
# Permission required to create a release
22+
permissions:
23+
contents: write
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Set Go
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version: v1.20
32+
cache-dependency-path: "ray-operator/go.sum"
33+
34+
- name: Verify that release doesn't exist yet
35+
shell: bash {0}
36+
run: |
37+
gh release view $KUBERAY_RELEASE_VERSION
38+
status=$?
39+
if [[ $status -eq 0 ]]; then
40+
echo "Release $KUBERAY_RELEASE_VERSION already exists."
41+
exit 1
42+
fi
43+
env:
44+
GITHUB_TOKEN: ${{ github.TOKEN }}
45+
46+
- name: Compile tests
47+
run: |
48+
go test -c -o compiled-tests/e2e ./test/e2e/
49+
working-directory: ray-operator
50+
51+
- name: Creates a release in GitHub
52+
run: |
53+
gh release create $KUBERAY_RELEASE_VERSION --target $GITHUB_SHA ray-operator/compiled-tests/*
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
56+
shell: bash

0 commit comments

Comments
 (0)