mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-30 06:51:59 -08:00
cleanup workflows (#4590)
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
This commit is contained in:
parent
eeee743d6c
commit
5ebc0f7f8d
2 changed files with 0 additions and 182 deletions
95
.github/workflows/bump_hls_js.yml
vendored
95
.github/workflows/bump_hls_js.yml
vendored
|
|
@ -1,95 +0,0 @@
|
|||
name: bump_hls_js
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '4 5 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
bump_hls_js:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: >
|
||||
git config user.name mediamtx-bot
|
||||
&& git config user.email bot@mediamtx
|
||||
&& ((git checkout deps/hlsjs && git rebase ${GITHUB_REF_NAME}) || git checkout -b deps/hlsjs)
|
||||
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const { createHash } = require('crypto');
|
||||
const fs = require('fs').promises;
|
||||
|
||||
// get last release
|
||||
let curRelease = null;
|
||||
for (let i = 1; i < 20; i++) {
|
||||
const releases = await github.rest.repos.listReleases({
|
||||
owner: 'video-dev',
|
||||
repo: 'hls.js',
|
||||
page: i,
|
||||
});
|
||||
for (const release of releases.data) {
|
||||
if (!release.prerelease) {
|
||||
curRelease = release;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (curRelease !== null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// compute checksum
|
||||
const content = await github.request(`https://github.com/video-dev/hls.js/releases/download/${curRelease['tag_name']}/release.zip`);
|
||||
const hash = createHash('sha256').update(Buffer.from(content.data)).digest('hex');
|
||||
|
||||
// write version and checksum to disk
|
||||
await fs.writeFile('internal/servers/hls/hlsjsdownloader/VERSION', curRelease['tag_name'] + '\n', 'utf-8');
|
||||
await fs.writeFile('internal/servers/hls/hlsjsdownloader/HASH', hash + '\n', 'utf-8');
|
||||
|
||||
// make version available to next steps
|
||||
core.exportVariable('VERSION', curRelease['tag_name']);
|
||||
|
||||
- id: check_repo
|
||||
run: >
|
||||
test -n "$(git status --porcelain)" && echo "update=1" >> "$GITHUB_OUTPUT" || echo "update=0" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- if: ${{ steps.check_repo.outputs.update == '1' }}
|
||||
run: >
|
||||
git reset ${GITHUB_REF_NAME}
|
||||
&& git add .
|
||||
&& git commit -m "bump hls.js to ${VERSION}"
|
||||
&& git push --set-upstream origin deps/hlsjs --force
|
||||
|
||||
- if: ${{ steps.check_repo.outputs.update == '1' }}
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const prs = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
head: `${context.repo.owner}:deps/hlsjs`,
|
||||
state: 'open',
|
||||
});
|
||||
|
||||
if (prs.data.length == 0) {
|
||||
await github.rest.pulls.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
head: 'deps/hlsjs',
|
||||
base: context.ref.slice('refs/heads/'.length),
|
||||
title: `bump hls-js to ${process.env.VERSION}`,
|
||||
});
|
||||
} else {
|
||||
github.rest.pulls.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: prs.data[0].number,
|
||||
title: `bump hls-js to ${process.env.VERSION}`,
|
||||
});
|
||||
}
|
||||
87
.github/workflows/bump_rpicamera.yml
vendored
87
.github/workflows/bump_rpicamera.yml
vendored
|
|
@ -1,87 +0,0 @@
|
|||
name: bump_rpicamera
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '4 5 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
bump_rpicamera:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: >
|
||||
git config user.name mediamtx-bot
|
||||
&& git config user.email bot@mediamtx
|
||||
&& ((git checkout deps/mediamtx-rpicamera && git rebase ${GITHUB_REF_NAME}) || git checkout -b deps/mediamtx-rpicamera)
|
||||
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const fs = require('fs').promises;
|
||||
|
||||
// get last release
|
||||
let curRelease = null;
|
||||
for (let i = 1; i < 20; i++) {
|
||||
const releases = await github.rest.repos.listReleases({
|
||||
owner: 'bluenviron',
|
||||
repo: 'mediamtx-rpicamera',
|
||||
page: i,
|
||||
});
|
||||
for (const release of releases.data) {
|
||||
curRelease = release;
|
||||
break;
|
||||
}
|
||||
if (curRelease !== null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// write version to disk
|
||||
await fs.writeFile('internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION', curRelease['tag_name'] + '\n', 'utf-8');
|
||||
|
||||
// make version available to next steps
|
||||
core.exportVariable('VERSION', curRelease.name);
|
||||
|
||||
- id: check_repo
|
||||
run: >
|
||||
test -n "$(git status --porcelain)" && echo "update=1" >> "$GITHUB_OUTPUT" || echo "update=0" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- if: ${{ steps.check_repo.outputs.update == '1' }}
|
||||
run: >
|
||||
git reset ${GITHUB_REF_NAME}
|
||||
&& git add .
|
||||
&& git commit -m "bump mediamtx-rpicamera to ${VERSION}"
|
||||
&& git push --set-upstream origin deps/mediamtx-rpicamera --force
|
||||
|
||||
- if: ${{ steps.check_repo.outputs.update == '1' }}
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const prs = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
head: `${context.repo.owner}:deps/mediamtx-rpicamera`,
|
||||
state: 'open',
|
||||
});
|
||||
|
||||
if (prs.data.length == 0) {
|
||||
await github.rest.pulls.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
head: 'deps/mediamtx-rpicamera',
|
||||
base: context.ref.slice('refs/heads/'.length),
|
||||
title: `bump mediamtx-rpicamera to ${process.env.VERSION}`,
|
||||
});
|
||||
} else {
|
||||
github.rest.pulls.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: prs.data[0].number,
|
||||
title: `bump mediamtx-rpicamera to ${process.env.VERSION}`,
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue