Skip to content

Commit

Permalink
Merge branch 'owncast:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wazerstar authored Sep 14, 2024
2 parents 09c2579 + 4a317b7 commit 5342e26
Show file tree
Hide file tree
Showing 108 changed files with 955 additions and 870 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/actions-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ jobs:
name: GitHub actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- uses: docker://rhysd/actionlint:latest
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-comment-on-label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
issues: write
steps:
- name: Add comment
uses: peter-evans/create-or-update-comment@2830915767dd95c84b29b83d41562b01c53be401
uses: peter-evans/create-or-update-comment@56f64a7a94402498e048b1113751190593f7125a
with:
issue-number: ${{ github.event.issue.number }}
body: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/automated-end-to-end-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ jobs:
with:
concurrent_skipping: 'same_content_newer'

- name: Checkout repository
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Get changed files
id: changed-files-yaml
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/browser-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ jobs:
with:
concurrent_skipping: 'same_content_newer'

- name: Checkout
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- uses: actions/setup-node@v4
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ jobs:
if: github.repository == 'owncast/owncast'

steps:
- name: Checkout
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Cache node modules
uses: actions/cache@v4
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ jobs:
with:
concurrent_skipping: 'same_content_newer'

- name: Check out code
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Get changed files
id: changed-files-yaml
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- uses: actions/setup-go@v5
with:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/container-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ jobs:
container:
image: aquasec/trivy
steps:
- uses: actions/checkout@v4
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Check critical issues
run: trivy config --exit-code 1 --severity "HIGH,CRITICAL" ./Dockerfile
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ jobs:
image: tonistiigi/binfmt:latest
platforms: all

- name: Checkout repo
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Build and push
if: ${{ github.event_name == 'schedule' && env.GH_CR_PAT != null }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/css-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ jobs:
working-directory: ./web

steps:
- name: Checkout repository
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Get changed files
id: changed-files-yaml
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/generate-api-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ jobs:
name: Generate API Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Run redoc on openapi.yaml
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/hls-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ jobs:
with:
concurrent_skipping: 'same_content_newer'

- name: Checkout repository
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Get changed files
id: changed-files-yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ jobs:
cancel_others: 'true'
skip_after_successful_duplicate: 'true'

- name: Checkout
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
persist-credentials: true

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Get changed files
id: changed-files-yaml
Expand Down Expand Up @@ -101,13 +102,15 @@ jobs:
cancel_others: 'true'
skip_after_successful_duplicate: 'true'

- name: Checkout
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Cache node modules
uses: actions/cache@v4
Expand All @@ -127,6 +130,10 @@ jobs:
- name: Check for unused JS code and dependencies
run: npx knip --include dependencies,files,exports

- name: Run tests
working-directory: ./web
run: npm test

# After any formatting and linting is complete we can run the build
# and bundle step. This both will verify that the build is successful as
# well as commiting the updated static files into the repository for use.
Expand Down Expand Up @@ -155,13 +162,15 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Checkout
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Bundle web app (next.js build)
run: build/web/bundleWeb.sh
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/javascript-tests.yml

This file was deleted.

11 changes: 10 additions & 1 deletion .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ jobs:
Screenshots:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- uses: actions/setup-go@v5
with:
go-version: '1.22'
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ jobs:
container:
image: docker.io/ubuntu:24.04
steps:
- uses: actions/checkout@v4
- name: Check out pull request code
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check out repository code
uses: actions/checkout@v4
if: github.event_name == 'push'

- name: Install shellcheck
run: apt update && apt install -y shellcheck bash && shellcheck --version
Expand Down
9 changes: 1 addition & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ linters:
- bodyclose
- dupl
- errcheck
- exportloopref
- goconst
- godot
- godox
Expand All @@ -49,7 +48,7 @@ linters:
- cyclop
- gosimple
- unused
- exportloopref
- copyloopvar
- gocritic
- forbidigo
- unparam
Expand All @@ -67,12 +66,6 @@ linters-settings:
# should ignore tests
skip-tests: true

gosimple:
# Select the Go version to target. The default is '1.13'.
go: '1.22'
# https://staticcheck.io/docs/options#checks
checks: ['all']

gocritic:
disabled-checks:
- ifElseChain
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV NAME=${NAME}
RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -ldflags "-extldflags \"-static\" -s -w -X github.com/owncast/owncast/config.GitCommit=$GIT_COMMIT -X github.com/owncast/owncast/config.VersionNumber=$VERSION -X github.com/owncast/owncast/config.BuildPlatform=$NAME" -o owncast .

# Create the image by copying the result of the build into a new alpine image
FROM alpine:3.20.2
FROM alpine:3.20.3
RUN apk update && apk add --no-cache ffmpeg ffmpeg-libs ca-certificates && update-ca-certificates

RUN addgroup -g 101 -S owncast && adduser -u 101 -S owncast -G owncast
Expand Down
Loading

0 comments on commit 5342e26

Please sign in to comment.