Skip to content

Add API error model, auth, and rate limiting #1

Add API error model, auth, and rate limiting

Add API error model, auth, and rate limiting #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}/gamifykit
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
cache: true
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Go fmt / vet / test / staticcheck
run: |
go fmt ./...
go vet ./...
go test ./...
$(go env GOPATH)/bin/staticcheck ./...
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
run: |
TAG=${GITHUB_REF_NAME#refs/tags/}
IMAGE_TAG=${IMAGE_NAME}:${TAG}
docker build -t ${IMAGE_TAG} .
docker push ${IMAGE_TAG}
- name: Publish latest tag
run: |
docker tag ${IMAGE_NAME}:${GITHUB_REF_NAME#refs/tags/} ${IMAGE_NAME}:latest
docker push ${IMAGE_NAME}:latest