chore(gh-actions): provide both docker and binary releases

This commit is contained in:
Evelyn Alicke 2024-03-27 11:51:47 +01:00 committed by Evelyn Alicke
parent 53c6f3cfe9
commit bf9549d801
Signed by: evlli
GPG key ID: 8092413A3F6DD75F
4 changed files with 36 additions and 31 deletions

19
.github/workflows/build-docker.yml vendored Normal file
View file

@ -0,0 +1,19 @@
---
name: Docker
on:
push:
branches: [ "main" ]
tags: [ '*' ]
pull_request:
jobs:
docker:
uses: famedly/github-workflows/.github/workflows/docker.yml@main
with:
push: ${{ github.event_name != 'pull_request' }} # Always build, don't publish on pull requests
registry_user: famedly-ci
registry: docker-oss.nexus.famedly.de
image_name: openmetrics-vici-exporter
build_args: "VERSION=${{ matrix.version }}"
secrets: inherit

13
.github/workflows/build-rust.yml vendored Normal file
View file

@ -0,0 +1,13 @@
---
name: Rust
on:
push:
branches: [main]
tags: ['*']
pull_request:
jobs:
build:
uses: famedly/github-workflows/.github/workflows/rust.yml@main
secrets: inherit

View file

@ -1,28 +0,0 @@
name: CI
on:
push:
tags:
- 'v*.*.*'
release:
types: [ published ]
jobs:
docker:
permissions: write-all
runs-on: ubuntu-latest
steps:
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}

View file

@ -1,7 +1,8 @@
version: '3'
services:
ove:
openmetrics-vici-exporter:
image: docker-oss.famedly.de/openmetrics-vici-exporter
restart: "unless-stopped"
environment:
- VICI_EXPORTER_VICI_SOCKET="/var/run/charon.vici"
@ -9,7 +10,7 @@ services:
- VICI_EXPORTER_SERVER_ADDRESS=0.0.0.0
- VICI_EXPORTER_SERVER_PORT=8001
volumes:
#- ./config.yml:/opt/openmetrics-vici-exporter/config.yml
# - ./config.yml:/opt/openmetrics-vici-exporter/config.yml
- /var/run/charon.vici:/var/run/charon.vici
ports:
- 8111:80/tcp
- 8001:8001/tcp