Skip to content

Commit

Permalink
update Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoWK committed Aug 30, 2023
1 parent f79be94 commit 33461af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Build and Release Binaries
name: Build, Test and Release Binaries

on:
push:
branches:
- main
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -18,8 +17,17 @@ jobs:
with:
go-version: 1.21

- name: Extract EXPORTER_VERSION
id: extract_exporter_version
run: echo "::set-output name=version::$(cat VERSION)"

- name: Run Tests
run: go test ./...

- name: Run Goreleaser
if: ${{ github.event_name != 'pull_request' }}
env:
EXPORTER_VERSION: ${{ steps.extract_exporter_version.outputs.version }}
uses: goreleaser/goreleaser-action@v3
with:
version: latest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build
dist
/vendor
.vscode
4 changes: 2 additions & 2 deletions pkg/exporter/prometheus-libvirt-exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ var (
[]string{"domain", "instanceName", "instanceId", "flavorName", "userName", "userId", "projectName", "projectId", "host", "source_file", "target_device"},
nil)
libvirtDomainBlockWrTimeDesc = prometheus.NewDesc(
prometheus.BuildFQName("libvirt", "domain_block_stats", "write_time_total"),
prometheus.BuildFQName(namespace, "domain_block_stats", "write_time_total"),
"Total duration of write requests from a block device. (ns)",
[]string{"domain", "instanceName", "instanceId", "flavorName", "userName", "userId", "projectName", "projectId", "host", "source_file", "target_device"},
nil)
libvirtDomainBlockRdTimeDesc = prometheus.NewDesc(
prometheus.BuildFQName("libvirt", "domain_block_stats", "read_time_total"),
prometheus.BuildFQName(namespace, "domain_block_stats", "read_time_total"),
"Total duration of read requests from a block device. (ns)",
[]string{"domain", "instanceName", "instanceId", "flavorName", "userName", "userId", "projectName", "projectId", "host", "source_file", "target_device"},
nil)
Expand Down

0 comments on commit 33461af

Please sign in to comment.