Skip to content

Commit

Permalink
ci: add build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rornic committed May 3, 2024
1 parent adeecdf commit 833a49c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Image (Build)

on: [push]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
rornic/starling-exporter
tags: |
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v5
with:
push: false
context: .
tags: ${{ steps.meta.outputs.tags }}
23 changes: 23 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Go

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'

- name: Install dependencies
run: go get .

- name: Build
run: go build -v ./...

- name: Test
run: go test

0 comments on commit 833a49c

Please sign in to comment.