fix mediamtx-rpicamera automatic updater (#3894)

This commit is contained in:
Alessandro Ros 2024-10-20 16:39:55 +02:00 committed by GitHub
parent 7c4849eb1e
commit b84ee99866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 7 deletions

View File

@ -23,19 +23,19 @@ jobs:
script: |
const fs = require('fs').promises;
// get last tag
let curTag = null;
// get last release
let curRelease = null;
for (let i = 1; i < 20; i++) {
const tags = await github.rest.repos.listTags({
const releases = await github.rest.repos.listReleases({
owner: 'bluenviron',
repo: 'mediamtx-rpicamera',
page: i,
});
for (const tag of tags.data) {
curTag = tag;
for (const release of releases.data) {
curRelease = release;
break;
}
if (curTag !== null) {
if (curRelease !== null) {
break;
}
}
@ -44,7 +44,7 @@ jobs:
await fs.writeFile('internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION', curRelease['tag_name'] + '\n', 'utf-8');
// make version available to next steps
core.exportVariable('VERSION', curTag.name);
core.exportVariable('VERSION', curRelease.name);
- id: check_repo
run: >