Skip to content

Commit d1dd50c

Browse files
authored
Merge pull request #28 from Sofie-Automation/develop
2 parents c9a455e + 11befea commit d1dd50c

37 files changed

+1571
-693
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: Build Docker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
- 'release**'
10+
tags:
11+
- 'v*.*.*'
12+
13+
jobs:
14+
check-build-steps:
15+
name: Check if build and push should be performed
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 5
18+
19+
outputs:
20+
dockerhub-enable: ${{ steps.dockerhub.outputs.dockerhub-publish }}
21+
ghcr-enable: ${{ steps.check-ghcr.outputs.enable }}
22+
build-and-push-enable: ${{ steps.check-build-and-push.outputs.enable }}
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
persist-credentials: false
28+
29+
- name: Determine if images should be published to DockerHub
30+
id: dockerhub
31+
run: |
32+
# check if a release branch, or main, or a tag
33+
if [[ "${{ github.ref }}" =~ ^refs/heads/release([0-9]+)$ || "${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" == refs/tags/* ]]
34+
then
35+
DOCKERHUB_PUBLISH="1"
36+
else
37+
DOCKERHUB_PUBLISH="0"
38+
fi
39+
# debug output
40+
echo "dockerhub-publish $DOCKERHUB_PUBLISH"
41+
echo "dockerhub-publish=$DOCKERHUB_PUBLISH" >> $GITHUB_OUTPUT
42+
43+
- name: Check if push to GHCR is enabled
44+
id: check-ghcr
45+
env:
46+
GHCR_ENABLED: ${{ secrets.GHCR_ENABLED }}
47+
run: |
48+
echo "Enable push to GHCR: ${{ env.GHCR_ENABLED != '' }}"
49+
echo "enable=${{ env.GHCR_ENABLED != '' }}" >> $GITHUB_OUTPUT
50+
51+
- name: Check if there is access to repo secrets (needed for build and push)
52+
if: steps.dockerhub.outputs.dockerhub-publish == '1' || steps.check-ghcr.outputs.enable == 'true'
53+
id: check-build-and-push
54+
env:
55+
SECRET_ACCESS: ${{ secrets.DOCKERHUB_USERNAME || secrets.GHCR_ENABLED }}
56+
run: |
57+
echo "Enable build and push: ${{ env.SECRET_ACCESS != '' }}"
58+
echo "enable=${{ env.SECRET_ACCESS != '' }}" >> $GITHUB_OUTPUT
59+
60+
build:
61+
name: Build and publish docker image for ${{ matrix.repo }}
62+
runs-on: ubuntu-latest
63+
timeout-minutes: 15
64+
needs:
65+
- check-build-steps
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
persist-credentials: false
71+
72+
- name: Get the docker tag for GHCR
73+
id: ghcr-tag
74+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true'
75+
uses: docker/metadata-action@v5
76+
with:
77+
images: |
78+
ghcr.io/${{ github.repository }}
79+
tags: |
80+
type=schedule
81+
type=ref,event=branch
82+
type=ref,event=tag
83+
type=raw,value=latest,enable={{is_default_branch}}
84+
type=raw,value=nightly,enable={{is_default_branch}}
85+
86+
- name: Get the docker tag for DockerHub
87+
id: dockerhub-tag
88+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true'
89+
uses: docker/metadata-action@v5
90+
with:
91+
images: |
92+
sofietv/input-gateway
93+
tags: |
94+
type=schedule
95+
type=ref,event=branch
96+
type=ref,event=tag
97+
type=raw,value=latest,enable={{is_default_branch}}
98+
type=raw,value=nightly,enable={{is_default_branch}}
99+
100+
- name: Set up Docker Buildx
101+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true'
102+
uses: docker/setup-buildx-action@v3
103+
104+
- name: Login to DockerHub
105+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true' && needs.check-build-steps.outputs.dockerhub-enable == '1'
106+
uses: docker/login-action@v3
107+
with:
108+
username: ${{ secrets.DOCKERHUB_USERNAME }}
109+
password: ${{ secrets.DOCKERHUB_TOKEN }}
110+
111+
- name: Login to GitHub Container Registry
112+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true' && needs.check-build-steps.outputs.ghcr-enable == 'true'
113+
uses: docker/login-action@v3
114+
with:
115+
registry: ghcr.io
116+
username: ${{ github.repository_owner }}
117+
password: ${{ secrets.GITHUB_TOKEN }}
118+
119+
- name: Build and push to GHCR
120+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true' && needs.check-build-steps.outputs.ghcr-enable == 'true'
121+
uses: docker/build-push-action@v6
122+
with:
123+
context: .
124+
file: Dockerfile
125+
push: true
126+
provenance: false
127+
labels: ${{ steps.ghcr-tag.outputs.labels }}
128+
tags: '${{ steps.ghcr-tag.outputs.tags }}'
129+
130+
- name: Build and push to DockerHub
131+
if: needs.check-build-steps.outputs.build-and-push-enable == 'true' && needs.check-build-steps.outputs.dockerhub-enable == '1'
132+
uses: docker/build-push-action@v6
133+
with:
134+
context: .
135+
file: Dockerfile
136+
push: true
137+
provenance: false
138+
labels: ${{ steps.dockerhub-tag.outputs.labels }}
139+
tags: '${{ steps.dockerhub-tag.outputs.tags }}'
140+
141+
trivy-scanning:
142+
name: Run Trivy scan for ${{ matrix.repo }}
143+
uses: nrkno/github-workflow-docker-build-push/.github/workflows/workflow.yaml@v4.3.0
144+
with:
145+
runs-on: "['ubuntu-latest']"
146+
registry-url: ghcr.io
147+
name: nrkno/sofie-package-manager
148+
# Don't actually push any images, this is just for trivy scanning for now
149+
push: false
150+
trivy-severity: 'CRITICAL'
151+
trivy-summary-enabled: true
152+
trivy-sbom-enabled: true
153+
dockerfile: Dockerfile
154+
secrets:
155+
registry-username: ${{ github.repository_owner }}
156+
registry-password: ${{ secrets.GITHUB_TOKEN }}
157+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-linux.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Build Linux
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
- 'release**'
10+
tags:
11+
- 'v**'
12+
13+
jobs:
14+
build:
15+
name: Build linux binaries
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 20
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Use Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '22'
28+
29+
- name: Run build
30+
env:
31+
CI: true
32+
PKG_CACHE_PATH: ${{ runner.temp }}
33+
run: |
34+
corepack enable
35+
# try and avoid timeout errors
36+
yarn config set httpTimeout 100000
37+
38+
yarn install
39+
yarn do:build-linux:ci
40+
41+
- name: Verify build
42+
run: yarn verify:build-linux
43+
env:
44+
CI: true
45+
46+
- name: ZIP output
47+
env:
48+
CI: true
49+
PKG_CACHE_PATH: ${{ runner.temp }}
50+
run: |
51+
yarn zip-deploy -linux-x64
52+
53+
- name: Upload artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: Linux
57+
path: deploy
58+
59+
release:
60+
name: Create Release
61+
runs-on: ubuntu-latest
62+
if: startsWith(github.ref, 'refs/tags/')
63+
needs:
64+
- build
65+
66+
permissions:
67+
contents: write
68+
69+
steps:
70+
- name: Download artifact
71+
uses: actions/download-artifact@v4
72+
with:
73+
name: Linux
74+
path: deploy
75+
76+
- name: Create Release
77+
uses: softprops/action-gh-release@v2
78+
with:
79+
files: deploy/*.zip
80+
prerelease: ${{ contains(github.ref, '-') }}
81+
fail_on_unmatched_files: true

.github/workflows/build-windows.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7-
- master
7+
- main
88
- develop
99
- 'release**'
1010
tags:
@@ -17,15 +17,14 @@ jobs:
1717
timeout-minutes: 20
1818

1919
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
20+
- uses: actions/checkout@v4
2221
with:
2322
persist-credentials: false
2423

2524
- name: Use Node.js
2625
uses: actions/setup-node@v4
2726
with:
28-
node-version: '18'
27+
node-version: '22'
2928

3029
- name: Run build
3130
env:
@@ -69,7 +68,7 @@ jobs:
6968
CI: true
7069
PKG_CACHE_PATH: ${{ runner.temp }}
7170
run: |
72-
yarn zip-deploy
71+
yarn zip-deploy -win-x64
7372
7473
- name: Upload artifacts
7574
uses: actions/upload-artifact@v4

.github/workflows/lint-and-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Use Node.js
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: '18'
26+
node-version: '22'
2727

2828
- name: Prepare Environment
2929
run: |
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ${{ matrix.os }}
4747
strategy:
4848
matrix:
49-
node_version: ['18']
49+
node_version: ['22']
5050
os: [ubuntu-latest] # [windows-latest, macOS-latest]
5151
timeout-minutes: 10
5252
steps:

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.19
1+
22.15.1

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.19
1+
22.15.1

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,60 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [0.4.0](https://github.com/Sofie-Automation/sofie-input-gateway/compare/v0.3.1-alpha.3...v0.4.0) (2025-07-01)
7+
8+
9+
### Features
10+
11+
* docker image ([02313be](https://github.com/Sofie-Automation/sofie-input-gateway/commit/02313be8338174228487a0da00a756472e22df6c))
12+
* support ip streamdecks ([#26](https://github.com/Sofie-Automation/sofie-input-gateway/issues/26)) ([1ed0913](https://github.com/Sofie-Automation/sofie-input-gateway/commit/1ed091345cd61288a41c59717196e3def2bb7a00))
13+
14+
15+
16+
17+
18+
## [0.3.1-alpha.3](https://github.com/nrkno/sofie-input-gateway/compare/v0.3.1-alpha.2...v0.3.1-alpha.3) (2025-03-24)
19+
20+
21+
### Bug Fixes
22+
23+
* add suffix to release ZIP ([0d931b0](https://github.com/nrkno/sofie-input-gateway/commit/0d931b0400eb7650574e7fe13d64bdd8d97a17aa))
24+
25+
26+
27+
28+
29+
## [0.3.1-alpha.2](https://github.com/nrkno/sofie-input-gateway/compare/v0.3.1-alpha.1...v0.3.1-alpha.2) (2025-03-24)
30+
31+
**Note:** Version bump only for package input-gateway-packages
32+
33+
34+
35+
36+
37+
## [0.3.1-alpha.1](https://github.com/nrkno/sofie-input-gateway/compare/v0.3.1-alpha.0...v0.3.1-alpha.1) (2025-01-28)
38+
39+
40+
### Features
41+
42+
* add more debug logging for tracing rendering issues with skia-canvas ([ab06124](https://github.com/nrkno/sofie-input-gateway/commit/ab061245bf5e92578b400e5d91d1af28bc8443e3))
43+
44+
45+
46+
47+
48+
## [0.3.1-alpha.0](https://github.com/nrkno/sofie-input-gateway/compare/v0.3.0...v0.3.1-alpha.0) (2025-01-24)
49+
50+
51+
### Bug Fixes
52+
53+
* resolve build issue related to p-queue ([8e850f8](https://github.com/nrkno/sofie-input-gateway/commit/8e850f84bf883862f41c78f3992b459c3ec93adb))
54+
* **Stream Deck:** update elgato-stream-deck library to resolve an issue with slow discovery of HID devices ([fbcb790](https://github.com/nrkno/sofie-input-gateway/commit/fbcb790c42be28b277aa8298f6432bb6271a5d6b))
55+
56+
57+
58+
59+
660
# [0.3.0](https://github.com/nrkno/sofie-input-gateway/compare/v0.3.0-alpha.2...v0.3.0) (2024-10-01)
761

862
**Note:** Version bump only for package input-gateway-packages

0 commit comments

Comments
 (0)