Compare commits

...

2 Commits

Author SHA1 Message Date
dd658be7ef
Logout user
All checks were successful
ci / docker (push) Successful in 15s
2024-03-28 11:00:54 +01:00
0322030e57
Update CI 2024-03-28 11:00:41 +01:00
2 changed files with 13 additions and 10 deletions

View File

@ -3,12 +3,12 @@ name: ci
on:
push:
branches:
- 'main'
- "*"
tags:
- '*'
- "*"
pull_request:
branches:
- 'main'
- "main"
jobs:
docker:
@ -18,6 +18,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
@ -29,17 +30,19 @@ jobs:
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
- name: Login to registry
if: github.ref_type == 'tag'
uses: docker/login-action@v3
with:
registry: git.sebclem.fr
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -54,7 +54,7 @@ def prom_exporter():
response.append('#HELP '+attribute+' '+info['help'])
response.append('#TYPE '+attribute+' '+info['type'])
response.append(attribute+'{'+info['device']+'} '+info['value'])
client.user.logout()
return '\n'.join(response)