Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ota-pre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: OTA Pre

# Tells gpustack/gpustack-ota that runner.py.json changed on main, so
# https://ota.gpustack.ai/pre follows main within minutes of the merge. The path
# is the one gpustack-ota's sources.yaml reads from here. Run it by hand to check
# the announcement reaches gpustack-ota, or to resend one that did not.

on:
push:
branches:
- main
paths:
- 'gpustack_runner/runner.py.json'
workflow_dispatch: {}

permissions:
contents: read

jobs:
announce:
runs-on: ubuntu-latest
timeout-minutes: 5
# A fork's main is nothing the OTA server publishes.
if: github.repository == 'gpustack/runner'
steps:
- name: Generate dispatch token
id: token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.CI_PRT_GENERATOR_ID }}
private-key: ${{ secrets.CI_PRT_GENERATOR_KEY }}
owner: gpustack
repositories: gpustack-ota
# All a dispatch needs; unset, it inherits every installation permission.
permission-contents: write

- name: Announce the change
env:
GH_TOKEN: ${{ steps.token.outputs.token }}
run: gh api repos/gpustack/gpustack-ota/dispatches -f event_type=source-changed
Loading