mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 14:33:07 +01:00
correctly set tag filter for jobs, compute git sha before starting a job
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
<?php
|
||||
include("functions.php");
|
||||
include("config.php");
|
||||
$api = "https://api.github.com/repos/#user#/#repo#/releases/latest";
|
||||
const API_BASE="https://api.github.com/repos/#user#/#repo#";
|
||||
$api = API_BASE."/releases/latest";
|
||||
$branchsha=API_BASE."/git/refs/heads/#branch#";
|
||||
$tagsha=API_BASE."/git/refs/tags/#tag#";
|
||||
$download = "https://github.com/#user#/#repo#/releases/download/#dlVersion#/#dlName#";
|
||||
$manifest = "?dlName=#mName#&dlVersion=#mVersion#&user=#user#&repo=#repo#";
|
||||
try {
|
||||
@@ -10,6 +13,18 @@ try {
|
||||
proxy(replaceVars($api, $vars));
|
||||
exit(0);
|
||||
}
|
||||
if (isset($_REQUEST['branch'])){
|
||||
$vars = fillUserAndRepo();
|
||||
$vars = addVars($vars, array('branch'));
|
||||
proxy(replaceVars($branchsha, $vars));
|
||||
exit(0);
|
||||
}
|
||||
if (isset($_REQUEST['tag'])){
|
||||
$vars = fillUserAndRepo();
|
||||
$vars = addVars($vars, array('tag'));
|
||||
proxy(replaceVars($tagsha, $vars));
|
||||
exit(0);
|
||||
}
|
||||
if (isset($_REQUEST['dlName'])) {
|
||||
$vars = fillUserAndRepo();
|
||||
$vars = addVars($vars, array('dlName', 'dlVersion'));
|
||||
|
||||
Reference in New Issue
Block a user