ci: add metadata generation to workflows

This commit is contained in:
Viren070
2025-05-29 22:52:16 +01:00
parent 7a8655dd43
commit 930eb2128d
2 changed files with 15 additions and 3 deletions
+13
View File
@@ -53,9 +53,11 @@ jobs:
if [[ "$(git rev-parse origin/main)" = "$(git rev-parse "${INPUT_REF}")" ]]; then
TAGS="${TAGS} latest"
fi
CHANNEL="stable"
;;
[0-9]*.[0-9]*.[0-9]*-nightly)
TAGS="${INPUT_REF} nightly"
CHANNEL="nightly"
;;
*)
echo "Invalid Input Ref: ${INPUT_REF}"
@@ -76,8 +78,19 @@ jobs:
echo EOF
} >> "${GITHUB_ENV}"
echo "CHANNEL=${CHANNEL}" >> "${GITHUB_ENV}"
cat "${GITHUB_ENV}"
- name: Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Generate metadata
run: |
node scripts/generateMetadata.js --channel=${{env.CHANNEL}}
- name: Build & Push
uses: docker/build-push-action@v6
with:
+2 -3
View File
@@ -2,9 +2,8 @@ const { writeFileSync, mkdirSync } = require('fs');
const { execSync } = require('child_process');
const path = require('path');
// check if --nightly flag is passed
const isNightly =
process.argv.includes('--nightly') || process.env.NIGHTLY === 'true';
const channel = process.argv.find((arg) => arg.startsWith('--channel='));
const isNightly = channel === '--channel=nightly';
// Get the version from package.json
let { version, description } = require('../package.json');