chore: test

This commit is contained in:
Florian Metz
2024-09-15 02:48:41 +02:00
parent 416b65f0d4
commit a02f25ba29
2 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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