mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
ci: add metadata generation to workflows
This commit is contained in:
@@ -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,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');
|
||||
|
||||
Reference in New Issue
Block a user