Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Merge pull request #18 from Gthulhu/copilot/migrate-scheduling-strate… #80

Merge pull request #18 from Gthulhu/copilot/migrate-scheduling-strate…

Merge pull request #18 from Gthulhu/copilot/migrate-scheduling-strate… #80

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.5'
- name: Build application
run: make build
- name: Build Docker image
run: make image
- name: Run tests
run: go test -v ./...
build-and-push-image:
name: Build and Push Container Image
runs-on: ubuntu-latest
needs: build-and-test
if: github.event_name != 'pull_request'
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}