update
Some checks failed
activate-server / goreleaser (push) Failing after 10s

This commit is contained in:
2025-03-12 16:59:45 +08:00
parent 9b4f218e77
commit 3328195dd9
4 changed files with 69 additions and 7 deletions

View File

@@ -0,0 +1,29 @@
name: activate-server
on:
push:
branches:
- main
paths:
- activate/**/*
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- uses: ko-build/setup-ko@v0.6
- name: Run GoReleaser
env:
KO_DOCKER_REPO: git.yoshino-s.xyz/${{ gitea.repository }}
run: |
cd activate
ko build --bare --sbom spdx --tags latest

View File

@@ -0,0 +1,34 @@
name: Patch
on:
workflow_dispatch:
inputs:
tag:
description: "Docker tag"
required: true
default: "latest"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: git.yoshino-s.xyz
username: ${{ gitea.repository_owner }}
password: ${{ secrets.PACKAGES_PASSWORD }}
- name: Replace tag
run: |
sed -i "s/latest/${{ gitea.event.inputs.tag }}/g" Dockerfile
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: git.yoshino-s.xyz/${{ gitea.repository }}:${{ gitea.event.inputs.tag }}

View File

@@ -1,7 +0,0 @@
{
"yaml.schemas": {
"https://taskfile.dev/schema.json": "file:///Users/cuichenyang/Workspace/projet/safeline/Taskfile"
},
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true
}

6
activate/.ko.yaml Normal file
View File

@@ -0,0 +1,6 @@
baseImageOverrides:
safeline: alpine:3.20.3
builds:
- id: ko-image
main: ./cmd/server