ping-monitoring

A prometheus exporter to monitor matrix federation with using the existing pingbot infra.
git clone git://archive.git.mtrnord.blog/MTRNord/ping-monitoring.git
Log | Files | Refs | LICENSE

commit 0ba359740dc8d054435c832b23f68bf63e93b2fe
parent 23e9f6a9fccfc742f7622c8eefb8f8e8922ae393
Author: MTRNord <mtrnord1@gmail.com>
Date:   Thu, 15 Feb 2024 22:36:12 +0100

Another try to make docker behave

Diffstat:
M.github/workflows/build_docker.yaml | 26+++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/.github/workflows/build_docker.yaml b/.github/workflows/build_docker.yaml @@ -9,7 +9,7 @@ on: # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: mtrnord/ping-monitoring # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: @@ -37,18 +37,12 @@ jobs: run: | echo ::set-output name=VERSION::$(git describe --tags --abbrev=0) echo ::set-output name=BRANCH::$(git rev-parse --abbrev-ref HEAD) - - name: Sanitize repo slug - uses: actions/github-script@v6 - id: repo_slug - with: - result-encoding: string - script: return '${{ env.REGISTRY }}/${{ github.repository }}'.toLowerCase() - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: - images: ${{ steps.repo_slug.outputs.result }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Install QEMU to enable cross-platform builds - name: Setup QEMU @@ -68,8 +62,8 @@ jobs: uses: docker/build-push-action@v5 with: context: . - outputs: type=image,name=${{ steps.meta.outputs.tags }},push-by-digest=true,name-canonical=true,push=true platforms: ${{ matrix.platform }} + outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=false,name-canonical=true,push=true labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha,scope=${{ matrix.platform }} cache-to: type=gha,mode=max,scope=${{ matrix.platform }} @@ -99,19 +93,13 @@ jobs: path: /tmp/digests pattern: digests-* merge-multiple: true - - name: Sanitize repo slug - uses: actions/github-script@v6 - id: repo_slug - with: - result-encoding: string - script: return '${{ env.REGISTRY }}/${{ github.repository }}'.toLowerCase() - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: ${{ steps.repo_slug.outputs.result }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Login to the Container registry uses: docker/login-action@v3 with: @@ -122,7 +110,7 @@ jobs: working-directory: /tmp/digests run: | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ steps.repo_slug.outputs.result }}@sha256:%s ' *) + $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect ${{ steps.repo_slug.outputs.result }}:${{ steps.meta.outputs.version }} -\ No newline at end of file + docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} +\ No newline at end of file