mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
fix mediamtx-rpicamera automatic updater (#3894)
This commit is contained in:
parent
7c4849eb1e
commit
b84ee99866
1 changed files with 7 additions and 7 deletions
14
.github/workflows/bump_rpicamera.yml
vendored
14
.github/workflows/bump_rpicamera.yml
vendored
|
|
@ -23,19 +23,19 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
|
|
||||||
// get last tag
|
// get last release
|
||||||
let curTag = null;
|
let curRelease = null;
|
||||||
for (let i = 1; i < 20; i++) {
|
for (let i = 1; i < 20; i++) {
|
||||||
const tags = await github.rest.repos.listTags({
|
const releases = await github.rest.repos.listReleases({
|
||||||
owner: 'bluenviron',
|
owner: 'bluenviron',
|
||||||
repo: 'mediamtx-rpicamera',
|
repo: 'mediamtx-rpicamera',
|
||||||
page: i,
|
page: i,
|
||||||
});
|
});
|
||||||
for (const tag of tags.data) {
|
for (const release of releases.data) {
|
||||||
curTag = tag;
|
curRelease = release;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (curTag !== null) {
|
if (curRelease !== null) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
await fs.writeFile('internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION', curRelease['tag_name'] + '\n', 'utf-8');
|
await fs.writeFile('internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION', curRelease['tag_name'] + '\n', 'utf-8');
|
||||||
|
|
||||||
// make version available to next steps
|
// make version available to next steps
|
||||||
core.exportVariable('VERSION', curTag.name);
|
core.exportVariable('VERSION', curRelease.name);
|
||||||
|
|
||||||
- id: check_repo
|
- id: check_repo
|
||||||
run: >
|
run: >
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue