This commit is contained in:
29
.gitea/workflows/activate-server.yaml
Normal file
29
.gitea/workflows/activate-server.yaml
Normal 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
|
||||
34
.gitea/workflows/patch.yaml
Normal file
34
.gitea/workflows/patch.yaml
Normal 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 }}
|
||||
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -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
6
activate/.ko.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
baseImageOverrides:
|
||||
safeline: alpine:3.20.3
|
||||
|
||||
builds:
|
||||
- id: ko-image
|
||||
main: ./cmd/server
|
||||
Reference in New Issue
Block a user