Skip to content

Commit

Permalink
Merge pull request #33 from benibr/master
Browse files Browse the repository at this point in the history
Create basic CI
  • Loading branch information
gabrieleiannetti authored Apr 29, 2024
2 parents 8336692 + 37980cb commit 1625ed0
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Continuous Integration
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- master
push:
branches:
- master
tags:
- '**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-run-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository contents
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build binary
run: |
docker build --tag lustre_exporter:binary -f docker/Dockerfile .
- name: Build rpm
run: |
docker build -t lustre_exporter:rpm -f docker/RPM-Dockerfile .
- name: Extract binary
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker run --rm -v $PWD:/cpy lustre_exporter:binary
sudo chown -R $USER:$GROUP build
- name: Upload binary
uses: actions/[email protected]
if: startsWith(github.ref, 'refs/tags/v')
with:
name: lustre-exporter Binary ${{ github.ref_name }}
path: build/
- name: Extract rpm
if: startsWith(github.ref, 'refs/tags/v')
run: |
sudo rm -rf build
docker run --rm -v $PWD:/rpm lustre_exporter:rpm
sudo chown -R $USER:$GROUP build
- name: Upload RPM
uses: actions/[email protected]
if: startsWith(github.ref, 'refs/tags/v')
with:
name: lustre-exporter RPM ${{ github.ref_name }}
path: build/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- TODO: Create an issue for both, if necessary.
[![Go Report Card](https://goreportcard.com/badge/github.com/HewlettPackard/lustre_exporter)](https://goreportcard.com/report/github.com/HewlettPackard/lustre_exporter)
[![Build Status](https://travis-ci.org/HewlettPackard/lustre_exporter.svg?branch=master)](https://travis-ci.org/HewlettPackard/lustre_exporter)
-->
[![Continuous Integration](https://github.com/GSI-HPC/lustre_exporter/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/GSI-HPC/lustre_exporter/actions/workflows/ci.yml)

[Prometheus](https://prometheus.io/) exporter for [Lustre](https://www.lustre.org/) metrics.

Expand Down

0 comments on commit 1625ed0

Please sign in to comment.