Skip to content

Test new node-exporter setup [9] #28

Test new node-exporter setup [9]

Test new node-exporter setup [9] #28

Workflow file for this run

name: Build
on:
push:
branches:
- main
- stable
- release
tags:
- v*
env:
REGISTRY: bikenow.vkw.tu-dresden.de
IMAGE_NAME: ${{ github.repository }}
jobs:
publish-node-exporter:
runs-on: self-hosted
container: docker:latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.NEXUS_DOCKER_PUB_USERNAME }}
password: ${{ secrets.NEXUS_DOCKER_PUB_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
# See: https://github.com/docker/metadata-action
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-node-exporter
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: node-exporter
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXUS_READ_USERNAME=${{ secrets.NEXUS_READ_USERNAME }}
NEXUS_READ_PASSWORD=${{ secrets.NEXUS_READ_PASSWORD }}
publish-prometheus:
runs-on: self-hosted
container: docker:latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.NEXUS_DOCKER_PUB_USERNAME }}
password: ${{ secrets.NEXUS_DOCKER_PUB_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
# See: https://github.com/docker/metadata-action
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXUS_READ_USERNAME=${{ secrets.NEXUS_READ_USERNAME }}
NEXUS_READ_PASSWORD=${{ secrets.NEXUS_READ_PASSWORD }}