forked from ray-project/kuberay
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CARRY: Add workflow to release ODH/Kuberay with compiled test binaries
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This workflow will compile e2e tests and release them | ||
|
||
name: ODH Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Tag to be used for release, i.e.: v0.0.1' | ||
required: true | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
KUBERAY_RELEASE_VERSION: ${{ github.event.inputs.version || github.ref_name }} | ||
|
||
jobs: | ||
release-odh: | ||
runs-on: ubuntu-latest | ||
|
||
# Permission required to create a release | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: v1.20 | ||
cache-dependency-path: "ray-operator/go.sum" | ||
|
||
- name: Verify that release doesn't exist yet | ||
shell: bash {0} | ||
run: | | ||
gh release view $KUBERAY_RELEASE_VERSION | ||
status=$? | ||
if [[ $status -eq 0 ]]; then | ||
echo "Release $KUBERAY_RELEASE_VERSION already exists." | ||
exit 1 | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ github.TOKEN }} | ||
|
||
- name: Compile tests | ||
run: | | ||
go test -c -o compiled-tests/e2e ./test/e2e/ | ||
working-directory: ray-operator | ||
|
||
- name: Creates a release in GitHub | ||
run: | | ||
gh release create $KUBERAY_RELEASE_VERSION --target $GITHUB_SHA ray-operator/compiled-tests/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} | ||
shell: bash |