File tree Expand file tree Collapse file tree 6 files changed +54
-7
lines changed Expand file tree Collapse file tree 6 files changed +54
-7
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ name: Image
2
2
3
3
on :
4
4
workflow_dispatch :
5
- schedule : [{cron: '25 9 * * 3'}] # 9:25 on Wednesdays
6
5
push :
7
6
branches : [main]
8
7
paths :
16
15
build :
17
16
runs-on : ubuntu-latest
18
17
steps :
18
+ - uses : actions/checkout@v4
19
+ - run : ./script/get-latest-obs.sh docker/obs.deb
20
+ env :
21
+ GITHUB_TOKEN : ${{ github.token }}
22
+
19
23
- uses : docker/setup-buildx-action@v3
20
24
- uses : docker/login-action@v3
21
25
with :
24
28
password : ${{ secrets.GITHUB_TOKEN }}
25
29
- uses : docker/build-push-action@v5
26
30
with :
27
- context : " {{ defaultContext }}: docker"
31
+ context : ./ docker
28
32
push : true
29
33
cache-from : type=registry,ref=${{ env.image }}:buildcache
30
34
cache-to : type=registry,ref=${{ env.image }}:buildcache,mode=max
Original file line number Diff line number Diff line change 1
1
cover * .out
2
2
cover * .html
3
3
example.png
4
+ docker /* .deb
Original file line number Diff line number Diff line change 1
1
*
2
2
! config
3
3
! cmd.sh
4
+ ! * .deb
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:latest AS build
2
2
ENV DEBIAN_FRONTEND noninteractive
3
- RUN apt-config dump | grep -E 'Install-(Recommends|Suggests)' | sed s/1/0 | tee /etc/apt/apt.conf.d/999norecommend
4
3
RUN apt-get update -y
5
- RUN apt-get install -y software-properties-common
6
- RUN add-apt-repository -y ppa:obsproject/ obs-studio
7
- RUN apt-get update -y
8
- RUN apt-get install -y obs-studio
4
+ COPY *.deb /tmp/obs.deb
5
+ RUN dpkg -i /tmp/ obs.deb || :
6
+ RUN apt-get install -y --fix-broken
7
+ RUN apt-get install -y qt6-wayland qt6-qpa-plugins
9
8
RUN apt-get install -y xvfb x11vnc
10
9
RUN apt-get install -y netcat
11
10
RUN rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ compare_versions() {
56
56
echo " $next " > /tmp/.goobs.protocol.next
57
57
}
58
58
59
+ build_image () {
60
+ if [ -z " $CI " ]; then return ; fi
61
+ gh workflow run image.yml
62
+ sleep 3
63
+ id=$( gh run list --workflow image.yml --event workflow_dispatch --json databaseId --jq ' first|.databaseId' )
64
+ gh run watch " $id " --interval 10
65
+ }
66
+
59
67
bump_versions () {
60
68
sed -i " s/$current /$next /g" version.go README.md
61
69
make generate
@@ -65,6 +73,7 @@ bump_versions() {
65
73
main () {
66
74
find_versions
67
75
compare_versions
76
+ build_image
68
77
bump_versions
69
78
}
70
79
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ main () {
4
+ path=${1?specify where you want the deb}
5
+
6
+ download_artifact > /tmp/obs.zip
7
+ rm -rf /tmp/obs
8
+ unzip -od /tmp/obs /tmp/obs.zip
9
+ mv /tmp/obs/* .deb " $path "
10
+ ls -al " $path "
11
+ }
12
+
13
+ download_artifact () {
14
+ repo=obsproject/obs-studio
15
+ id=$( gh api /repos/$repo /actions/artifacts --jq '
16
+ [
17
+ .artifacts[]
18
+ | select(
19
+ .workflow_run.head_branch == "master" and
20
+ (.name|contains("ubuntu")) and
21
+ (.name|contains("dbgsym")|not)
22
+ )
23
+ ]
24
+ | sort_by(.created_at)
25
+ | reverse
26
+ | first
27
+ | .id
28
+ ' )
29
+ gh api " /repos/$repo /actions/artifacts/$id /zip"
30
+ }
31
+
32
+ set -eu
33
+ main " $@ "
You can’t perform that action at this time.
0 commit comments