Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 61cf83ad7a | |||
| 859635b45a | |||
| 150e914ed4 | |||
| 80012a7b6a | |||
| d96dfc24f2 |
5 changed files with 86 additions and 3 deletions
24
.forgejo/workflows/lint.yml
Normal file
24
.forgejo/workflows/lint.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v6
|
||||||
|
with:
|
||||||
|
go-version: '1.26'
|
||||||
|
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v9
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
|
||||||
|
- name: Run Biome
|
||||||
|
run: npx @biomejs/biome@latest check .
|
||||||
56
.forgejo/workflows/release.yml
Normal file
56
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Get version from VERSION file
|
||||||
|
id: version
|
||||||
|
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create tag
|
||||||
|
run: |
|
||||||
|
git config user.name forgejo-actions
|
||||||
|
git config user.email forgejo-actions@lonecloud.dev
|
||||||
|
git tag -a v${{ steps.version.outputs.VERSION }} -m "Release v${{ steps.version.outputs.VERSION }}"
|
||||||
|
git push origin v${{ steps.version.outputs.VERSION }}
|
||||||
|
|
||||||
|
- name: Create Forgejo Release
|
||||||
|
run: |
|
||||||
|
curl -s -X POST "https://git.lonecloud.dev/api/v1/repos/${{ github.repository }}/releases" \
|
||||||
|
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"v${{ steps.version.outputs.VERSION }}\",\"name\":\"v${{ steps.version.outputs.VERSION }}\",\"generate_release_notes\":true}"
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
|
- name: Login to Forgejo Container Registry
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: git.lonecloud.dev
|
||||||
|
username: ${{ secrets.FORGEJO_USERNAME }}
|
||||||
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v7
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
no-cache: true
|
||||||
|
tags: |
|
||||||
|
git.lonecloud.dev/lone-cloud/snowflake-dashboard:latest
|
||||||
|
git.lonecloud.dev/lone-cloud/snowflake-dashboard:v${{ steps.version.outputs.VERSION }}
|
||||||
5
Makefile
5
Makefile
|
|
@ -20,6 +20,9 @@ test:
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
|
||||||
release:
|
release:
|
||||||
gh workflow run release.yml
|
curl -s -X POST "https://git.lonecloud.dev/api/v1/repos/lone-cloud/snowflake-dashboard/actions/workflows/release.yml/dispatches" \
|
||||||
|
-H "Authorization: token $$(cat ~/.config/forgejo-token)" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"ref":"master"}'
|
||||||
|
|
||||||
.PHONY: lint fix check dev build docker test release
|
.PHONY: lint fix check dev build docker test release
|
||||||
|
|
|
||||||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
1.10.1
|
1.10.2
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
snowflake-dashboard:
|
snowflake-dashboard:
|
||||||
container_name: snowflake-dashboard
|
container_name: snowflake-dashboard
|
||||||
image: ghcr.io/lone-cloud/snowflake-dashboard:latest
|
image: git.lonecloud.dev/lone-cloud/snowflake-dashboard:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: host
|
network_mode: host
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue