Migrate to GitHub
This commit is contained in:
parent
d182adba8c
commit
66b2f83a88
10 changed files with 82 additions and 53 deletions
44
.drone.yml
44
.drone.yml
|
@ -1,44 +0,0 @@
|
|||
kind: pipeline
|
||||
name: build & release
|
||||
|
||||
steps:
|
||||
- name: fetch tags
|
||||
image: docker:git
|
||||
commands:
|
||||
- git fetch --tags
|
||||
when:
|
||||
event: tag
|
||||
- name: test
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- go test -v ./internal/gemini
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
- name: release
|
||||
image: golang:1.15
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: goreleaser_gitea_token
|
||||
commands:
|
||||
- curl -sL https://git.io/goreleaser | bash
|
||||
when:
|
||||
event: tag
|
||||
- name: build docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: username
|
||||
password:
|
||||
from_secret: password
|
||||
repo: registry.git.tdem.in/gmnhg
|
||||
registry: registry.git.tdem.in
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- ${DRONE_TAG}
|
||||
- latest
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
30
.github/workflows/docker.yml
vendored
Normal file
30
.github/workflows/docker.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Push to GHCR
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
- name: Build & push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/tdemin/gmnhg:latest
|
||||
ghcr.io/tdemin/gmnhg:${{ github.event.release.tag_name }}
|
25
.github/workflows/goreleaser.yml
vendored
Normal file
25
.github/workflows/goreleaser.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: Run goreleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
21
.github/workflows/tests.yml
vendored
Normal file
21
.github/workflows/tests.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Run tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: v1.41.1
|
|
@ -45,9 +45,6 @@ changelog:
|
|||
- '^test:'
|
||||
|
||||
release:
|
||||
gitea:
|
||||
github:
|
||||
owner: tdemin
|
||||
name: gmnhg
|
||||
|
||||
gitea_urls:
|
||||
api: https://git.tdem.in/api/v1/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Hugo-to-Gemini converter
|
||||
|
||||
[![PkgGoDev](https://pkg.go.dev/badge/git.tdem.in/tdemin/gmnhg)](https://pkg.go.dev/git.tdem.in/tdemin/gmnhg)
|
||||
[![PkgGoDev](https://pkg.go.dev/badge/github.com/tdemin/gmnhg)](https://pkg.go.dev/github.com/tdemin/gmnhg)
|
||||
|
||||
This repo holds a converter of Hugo Markdown posts to
|
||||
[text/gemini][Gemtext] (also named Gemtext in this README). The
|
||||
|
|
|
@ -76,7 +76,7 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
gemini "git.tdem.in/tdemin/gmnhg"
|
||||
gemini "github.com/tdemin/gmnhg"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
gemini "git.tdem.in/tdemin/gmnhg"
|
||||
gemini "github.com/tdemin/gmnhg"
|
||||
)
|
||||
|
||||
var version = "v0+HEAD"
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module git.tdem.in/tdemin/gmnhg
|
||||
module github.com/tdemin/gmnhg
|
||||
|
||||
go 1.15
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.tdem.in/tdemin/gmnhg/internal/gemini"
|
||||
"github.com/gomarkdown/markdown"
|
||||
"github.com/gomarkdown/markdown/parser"
|
||||
"github.com/tdemin/gmnhg/internal/gemini"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue