-
Notifications
You must be signed in to change notification settings - Fork 31
62 lines (56 loc) · 2.17 KB
/
comfyui-trigger.yaml
File metadata and controls
62 lines (56 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Handle trigger from comfystream repo
on:
workflow_dispatch:
inputs:
comfyui-base-digest:
description: "SHA256 image digest for livepeer/comfyui-base docker image"
required: true
type: string
triggering-branch:
description: "Branch name or PR in comfystream triggering this workflow"
required: true
type: string
branch-prefix:
description: "Prefix for branch name to create PR here"
required: false
type: string
default: "comfyui/"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ !((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag') }}
jobs:
trigger:
name: Trigger handler
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update Dockerfile.live-base-comfyui
shell: bash
run: |
BASE_IMAGE="livepeer/comfyui-base@${{ inputs.comfyui-base-digest }}"
sed -i "1s~.*~ARG BASE_IMAGE=$BASE_IMAGE~" runner/docker/Dockerfile.live-base-comfyui
head runner/docker/Dockerfile.live-base-comfyui
- name: Commit and push changes
id: branch-commit
uses: devops-infra/action-commit-push@v0.10.0
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
with:
github_token: ${{ secrets.CI_GITHUB_TOKEN }}
target_branch: "${{ inputs.branch-prefix }}${{ inputs.triggering-branch }}"
commit_prefix: "[AUTO-COMMIT] "
commit_message: "Update `Dockerfile.live-base-comfyui` with new BASE_IMAGE"
force: true
- name: Create pull request
uses: devops-infra/action-pull-request@v1.0.2
with:
github_token: ${{ secrets.CI_GITHUB_TOKEN }}
source_branch: ${{ steps.branch-commit.outputs.branch_name }}
target_branch: main
title: "[BOT] Update BASE_IMAGE to trigger ai-runner rebuild for comfyui (${{ inputs.triggering-branch }})"
assignee: "${{ github.actor }}"
get_diff: true
allow_no_diff: false