mirror of
https://github.com/PreMiD/PreMiD.git
synced 2026-04-06 04:41:58 +02:00
chore: test
This commit is contained in:
8
.github/workflows/cd.yaml
vendored
8
.github/workflows/cd.yaml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Build and Push website
|
||||
uses: docker/build-push-action@v6
|
||||
if: github.ref_type == 'branch'
|
||||
if: matrix.target == 'website'
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -50,14 +50,14 @@ jobs:
|
||||
tags: ghcr.io/premid/${{ matrix.target }}:beta-${{ github.sha }}-${{ github.run_number }}
|
||||
|
||||
- name: Get package.json version
|
||||
if: matrix.target != 'website'
|
||||
id: get_version
|
||||
run: echo ::set-output name=version::$(echo "${GITHUB_REF##*/}" | sed -E 's/^.+-v([0-9]+\.[0-9]+\.[0-9]+)$/\1/')
|
||||
run: echo ::set-output name=version::$(node -p "require('./apps/${{ matrix.target }}/package.json').version")
|
||||
shell: bash
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
||||
- name: Build and push other images
|
||||
uses: docker/build-push-action@v6
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: matrix.target != 'website' && startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
@@ -24,15 +24,15 @@ export async function updateActivePresenceGauge() {
|
||||
|
||||
// Set current counts and remove from previousServices
|
||||
serviceCounts.forEach((count, serviceVersion) => {
|
||||
const [service, version] = serviceVersion.split(":");
|
||||
activePresenceGauge.record(count, { service, version }); //* Include version in labels
|
||||
const [presence_name, version] = serviceVersion.split(":");
|
||||
activePresenceGauge.record(count, { presence_name, version });
|
||||
previousServices.delete(serviceVersion);
|
||||
});
|
||||
|
||||
// Set gauge to 0 for services that are no longer active
|
||||
previousServices.forEach((serviceVersion) => {
|
||||
const [service, version] = serviceVersion.split(":");
|
||||
activePresenceGauge.record(0, { service, version });
|
||||
const [presence_name, version] = serviceVersion.split(":");
|
||||
activePresenceGauge.record(0, { presence_name, version });
|
||||
});
|
||||
|
||||
// Update the set of previous services
|
||||
|
||||
Reference in New Issue
Block a user