Skip to content

define structure of metric sets (#1) #4

define structure of metric sets (#1)

define structure of metric sets (#1) #4

name: build containers metrics-operator
on:
pull_request: []
push:
branches:
- main
jobs:
build-containers:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [["docker/sysstat", "ghcr.io/converged-computing/benchmark-sysstat:latest"]]
steps:
- name: Clone the code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ^1.18
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull Layers (if exist)
env:
container: ${{ matrix.test[1] }}
run: docker pull ${container} || echo "${container} not pushed yet"
- name: Build Container
env:
context: ${{ matrix.test[0] }}
container: ${{ matrix.test[1] }}
run: |
cd ${context}
docker build -t ${container} .
- name: Deploy Container
if: (github.event_name != 'pull_request')
env:
container: ${{ matrix.test[1] }}
run: docker push ${container}