feat: initial commit
build / test (push) Successful in 9s
build / build (push) Successful in 10s
build / build-image (push) Successful in 1m4s

This commit is contained in:
2026-06-04 14:19:37 +02:00
commit cf961ab94f
28 changed files with 3036 additions and 0 deletions
+75
View File
@@ -0,0 +1,75 @@
name: build
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: go build ./...
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test
run: go test ./...
build-image:
runs-on: ubuntu-latest
needs:
- build
- test
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: registry.mkz.me/mycroft/scoreboard-api
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
- name: Docker login
uses: docker/login-action@v3
with:
registry: registry.mkz.me
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Containerfile
pull: true
push: true
tags: ${{ steps.meta.outputs.tags }}