Skip to content

Commit

Permalink
Merge pull request #3 from bluenviron/main
Browse files Browse the repository at this point in the history
pull updates from forked main
  • Loading branch information
scottf-tvw authored Jan 24, 2024
2 parents e26560f + cf7088a commit f0b72e4
Show file tree
Hide file tree
Showing 353 changed files with 20,193 additions and 14,292 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ yes / no
<!--
If the bug arises when using MediaMTX with an external hardware or software, the most helpful content you can provide is a dump of the data exchanged between the server and the target (network dump), that can be generated in this way:
1) Download wireshark (https://www.wireshark.org/)
2) Start capturing on the interface used for exchanging RTSP (if the server and the target software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card)
2) Start capturing on the interface used for exchanging packets (if the server and the external hardware or software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card)
3) Start the server and replicate the issue
4) Stop capturing, save the result in .pcap format
5) Attach
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ assignees: ''

---

<!--
Please create a request FOR EACH feature. Do not report multiple features in a single request, otherwise they'll probably never get ALL implemented.
-->

## Describe the feature

Description
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: bump-hls-js
name: bump_hls_js

on:
schedule:
- cron: '4 5 * * *'
workflow_dispatch:

jobs:
bump-hls-js:
bump_hls_js:
runs-on: ubuntu-20.04

steps:
Expand All @@ -20,8 +20,8 @@ jobs:
&& ((git checkout deps/hlsjs && git rebase ${GITHUB_REF_NAME}) || git checkout -b deps/hlsjs)
- run: >
curl -o internal/core/hls.min.js https://cdn.jsdelivr.net/npm/hls.js@latest/dist/hls.min.js
&& echo VERSION=$(cat internal/core/hls.min.js | grep -o '"version",get:function(){return".*"}' | sed 's/"version",get:function(){return"\(.*\)"}/\1/') >> $GITHUB_ENV
curl -o internal/servers/hls/hls.min.js https://cdn.jsdelivr.net/npm/hls.js@latest/dist/hls.min.js
&& echo VERSION=$(cat internal/servers/hls/hls.min.js | grep -o '"version",get:function(){return".*"}' | sed 's/"version",get:function(){return"\(.*\)"}/\1/') >> $GITHUB_ENV
- id: check_repo
run: >
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml → .github/workflows/code_lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint
name: code_lint

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main ]

jobs:
code:
golangci_lint:
runs-on: ubuntu-22.04

steps:
Expand All @@ -19,23 +19,23 @@ jobs:

- uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
version: v1.55.0

mod-tidy:
mod_tidy:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v2
with:
go-version: "1.20"
go-version: "1.21"

- run: |
go mod tidy
git diff --exit-code
apidocs:
api_docs:
runs-on: ubuntu-22.04

steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: code_test

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main ]

jobs:
test64:
test_64:
runs-on: ubuntu-22.04

steps:
Expand All @@ -19,7 +19,7 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

test32:
test_32:
runs-on: ubuntu-22.04

steps:
Expand All @@ -35,6 +35,6 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "1.20"
go-version: "1.21"

- run: make test-highlevel-nodocker
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: issue-lint
name: issue_lint

on:
issues:
types: [opened]

jobs:
issue-lint:
issue_lint:
runs-on: ubuntu-latest

steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: issue-lock
name: issue_lock

on:
schedule:
- cron: '40 15 * * *'
workflow_dispatch:

jobs:
issue-lock:
issue_lock:
runs-on: ubuntu-latest

steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: binaries
name: nightly_binaries

on:
workflow_dispatch:

jobs:
binaries:
nightly_binaries:
runs-on: ubuntu-22.04

steps:
Expand Down
51 changes: 47 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ jobs:
name: binaries
path: binaries

github:
github_release:
needs: binaries
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: binaries
Expand Down Expand Up @@ -58,6 +56,51 @@ jobs:
});
}
github_notify_issues:
needs: github_release
runs-on: ubuntu-22.04

steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { repo: { owner, repo } } = context;
const tags = await github.rest.repos.listTags({
owner,
repo,
});
const curTag = tags.data[0];
const prevTag = tags.data[1];
const diff = await github.rest.repos.compareCommitsWithBasehead({
owner,
repo,
basehead: `${prevTag.commit.sha}...${curTag.commit.sha}`,
});
const issues = {};
for (const commit of diff.data.commits) {
for (const match of commit.commit.message.matchAll(/(^| |\()#([0-9]+)( |\)|$)/g)) {
issues[match[2]] = 1;
}
}
for (const issue in issues) {
try {
await github.rest.issues.createComment({
owner,
repo,
issue_number: parseInt(issue),
body: `This issue is mentioned in release ${curTag.name} 🚀\n`
+ `Check out the entire changelog by [clicking here](https://github.com/${owner}/${repo}/releases/tag/${curTag.name})`,
});
} catch (exc) {}
}
dockerhub:
needs: binaries
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -87,7 +130,7 @@ jobs:
DOCKER_USER_LEGACY: ${{ secrets.DOCKER_USER_LEGACY }}
DOCKER_PASSWORD_LEGACY: ${{ secrets.DOCKER_PASSWORD_LEGACY }}

apidocs:
api_docs:
needs: binaries
runs-on: ubuntu-22.04

Expand Down
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
linters:
enable:
- asciicheck
- bidichk
- bodyclose
- dupl
- errorlint
- exportloopref
- gochecknoinits
- gocritic
Expand All @@ -13,6 +16,7 @@ linters:
- prealloc
- revive
- unconvert
- tparallel
- wastedassign
- whitespace

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.20-alpine3.18
LINT_IMAGE = golangci/golangci-lint:v1.53.3
BASE_IMAGE = golang:1.21-alpine3.18
LINT_IMAGE = golangci/golangci-lint:v1.55.2
NODE_IMAGE = node:16-alpine3.18
ALPINE_IMAGE = alpine:3.18
RPI32_IMAGE = balenalib/raspberry-pi:bullseye-run-20230712
Expand Down
Loading

0 comments on commit f0b72e4

Please sign in to comment.