Skip to content

Commit

Permalink
CARRY: Add workflow to release ODH/Kueue with compiled test binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
sutaakar committed Jun 21, 2024
1 parent e3123d0 commit 3d35a83
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/odh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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:
KUEUE_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.21

- name: Verify that release doesn't exist yet
shell: bash {0}
run: |
gh release view $KUEUE_RELEASE_VERSION
status=$?
if [[ $status -eq 0 ]]; then
echo "Release $KUEUE_RELEASE_VERSION already exists."
exit 1
fi
env:
GITHUB_TOKEN: ${{ github.TOKEN }}

- name: Compile tests
run: |
go test -c -o compiled-tests/e2e-singlecluster ./test/e2e/singlecluster/
- name: Creates a release in GitHub
run: |
gh release create $KUEUE_RELEASE_VERSION --target $GITHUB_SHA compiled-tests/*
env:
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
shell: bash

0 comments on commit 3d35a83

Please sign in to comment.