Migrate repository to new hosting and cleanup CI/CD files

Switched module path and imports to gitea.tryanks.com. Removed GitHub-specific files like workflows, dependabot, and devcontainer as part of migration. This streamlines the codebase for the new hosting environment.
This commit is contained in:
2025-05-12 22:33:48 +08:00
parent 43924743e2
commit 0d83ec6b6c
13 changed files with 10 additions and 144 deletions

View File

@@ -1,4 +0,0 @@
FROM golang:1.22-bullseye
# Creates an app directory to hold your apps source code
WORKDIR /app

View File

@@ -1,22 +0,0 @@
{
"name": "Go PDF Sign",
"dockerFile": "Dockerfile",
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go"
},
"extensions": ["golang.go"]
}
},
"containerEnv": {
"TMPDIR": "/workspaces/pdfsign/tmp"
},
"forwardPorts": [],
"postCreateCommand": "go mod download",
"remoteUser": "root"
}

View File

@@ -1,11 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"

View File

@@ -1,35 +0,0 @@
name: Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.20
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
flags: unittests
name: codecov-umbrella

View File

@@ -1,55 +0,0 @@
name: golangci-lint
on:
push:
branches:
- master
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.62
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true, then all caching functionality will be completely disabled,
# takes precedence over all other caching options.
# skip-cache: true
# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"

View File

@@ -1,15 +1,7 @@
# Signing PDF files with Go # Signing PDF files with Go
[![Build & Test](https://github.com/digitorus/pdfsign/workflows/Build%20&%20Test/badge.svg)](https://github.com/digitorus/pdfsign/actions?query=workflow%3Abuild-and-test)
[![golangci-lint](https://github.com/digitorus/pdfsign/workflows/golangci-lint/badge.svg)](https://github.com/digitorus/pdfsign/actions?query=workflow%3Agolangci-lint)
[![Go Report Card](https://goreportcard.com/badge/github.com/digitorus/pdfsign)](https://goreportcard.com/report/github.com/digitorus/pdfsign)
[![Coverage Status](https://codecov.io/gh/digitorus/pdfsign/branch/main/graph/badge.svg)](https://codecov.io/gh/)
[![Go Reference](https://pkg.go.dev/badge/github.com/digitorus/pdfsign.svg)](https://pkg.go.dev/github.com/digitorus/pdfsign)
This PDF signing library is written in [Go](https://go.dev). The library is in development, might not work for all PDF files and the API might change, bug reports, contributions and suggestions are welcome. This PDF signing library is written in [Go](https://go.dev). The library is in development, might not work for all PDF files and the API might change, bug reports, contributions and suggestions are welcome.
**See also our [PDFSigner](https://github.com/digitorus/pdfsigner/), a more advanced digital signature server that is using this project.**
## From the command line ## From the command line
``` ```

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/digitorus/pdfsign module gitea.tryanks.com/Tryanks/pdfsign
go 1.23.0 go 1.23.0

View File

@@ -12,8 +12,8 @@ import (
"os" "os"
"time" "time"
"github.com/digitorus/pdfsign/sign" "gitea.tryanks.com/Tryanks/pdfsign/sign"
"github.com/digitorus/pdfsign/verify" "gitea.tryanks.com/Tryanks/pdfsign/verify"
) )
var ( var (

View File

@@ -8,7 +8,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/digitorus/pdfsign/revocation" "gitea.tryanks.com/Tryanks/pdfsign/revocation"
"golang.org/x/crypto/ocsp" "golang.org/x/crypto/ocsp"
) )

View File

@@ -9,7 +9,7 @@ import (
"encoding/pem" "encoding/pem"
"testing" "testing"
"github.com/digitorus/pdfsign/revocation" "gitea.tryanks.com/Tryanks/pdfsign/revocation"
) )
const certPem = `-----BEGIN CERTIFICATE----- const certPem = `-----BEGIN CERTIFICATE-----

View File

@@ -9,8 +9,8 @@ import (
"os" "os"
"time" "time"
"gitea.tryanks.com/Tryanks/pdfsign/revocation"
"github.com/digitorus/pdf" "github.com/digitorus/pdf"
"github.com/digitorus/pdfsign/revocation"
"github.com/digitorus/pkcs7" "github.com/digitorus/pkcs7"
"github.com/mattetti/filebuffer" "github.com/mattetti/filebuffer"

View File

@@ -12,9 +12,9 @@ import (
"testing" "testing"
"time" "time"
"gitea.tryanks.com/Tryanks/pdfsign/revocation"
"gitea.tryanks.com/Tryanks/pdfsign/verify"
"github.com/digitorus/pdf" "github.com/digitorus/pdf"
"github.com/digitorus/pdfsign/revocation"
"github.com/digitorus/pdfsign/verify"
"github.com/mattetti/filebuffer" "github.com/mattetti/filebuffer"
) )

View File

@@ -12,8 +12,9 @@ import (
"strings" "strings"
"time" "time"
"gitea.tryanks.com/Tryanks/pdfsign/revocation"
"github.com/digitorus/pdf" "github.com/digitorus/pdf"
"github.com/digitorus/pdfsign/revocation"
"github.com/digitorus/pkcs7" "github.com/digitorus/pkcs7"
"github.com/digitorus/timestamp" "github.com/digitorus/timestamp"
"golang.org/x/crypto/ocsp" "golang.org/x/crypto/ocsp"