Merge branch 'master' of ssh://git.jonasfranz.software:10022/JonasFranzDEV/gitea-github-migrator into tests

pull/5/head
Jonas Franz 6 years ago
commit 602b5f012e
Signed by: JonasFranzDEV
GPG Key ID: 506AEEBE80BEDECD
  1. 40
      .drone.yml
  2. 18
      Dockerfile
  3. 27
      Gopkg.toml
  4. 7
      Makefile
  5. 12
      README.md

@ -32,7 +32,8 @@ pipeline:
commands:
- make release
when:
event: [ tag ]
event: [ push, tag ]
branch: [ master ]
gitea:
image: plugins/gitea-release:latest
pull: true
@ -45,6 +46,43 @@ pipeline:
- md5
when:
event: [ tag ]
docker:
image: plugins/docker:17.12
secrets: [ docker_username, docker_password ]
pull: true
repo: jonasfranz/gitea-github-migrator
default_tags: true
when:
event: [ push, tag ]
branch: [ master ]
s3:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: gitea-github-migrator
path_style: true
acl: public-read
source: releases/*
target: dist/master
strip_prefix: releases/
endpoint: https://storage.h.jonasfranz.software
when:
event: [ push ]
branch: [ master ]
s3:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: gitea-github-migrator
path_style: true
acl: public-read
source: releases/*
target: dist/${DRONE_TAG##v}
strip_prefix: releases/
endpoint: https://storage.h.jonasfranz.software
when:
event: [ tag ]
services:
gitea:
image: jonasfranz/gitea-service

@ -0,0 +1,18 @@
#Build stage
FROM golang:1.10-alpine3.7 AS build-env
#Build deps
RUN apk --no-cache add build-base git
#Setup repo
COPY . ${GOPATH}/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
WORKDIR ${GOPATH}/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
RUN make docker-binary
FROM alpine:3.7
LABEL maintainer="info@jonasfranz.software"
COPY --from=build-env /go/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/gitea-github-migrator /usr/local/bin/gitea-github-migrator
ENTRYPOINT ["/usr/local/bin/gitea-github-migrator"]

@ -1,30 +1,3 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[prune]
go-tests = true
unused-packages = true

@ -1,7 +1,6 @@
IMPORT := git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
GO ?= go
BUILD=$(or ${DRONE_BUILD_NUMBER},${DRONE_BUILD_NUMBER},0)
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
@ -13,11 +12,15 @@ else
endif
endif
LDFLAGS := -X main.Version=$(VERSION) -X main.build=$(BUILD)
LDFLAGS := -X main.version=$(VERSION) -X main.build=$(DRONE_BUILD_NUMBER)
.PHONY: all
all:
.PHONY: docker-binary
docker-binary:
go build -ldflags "$(LDFLAGS)" -o gitea-github-migrator
.PHONY: release
release:
@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \

@ -1,5 +1,7 @@
# gitea-github-migrator
[![Build Status](https://drone.jonasfranz.software/api/badges/JonasFranzDEV/gitea-github-migrator/status.svg)](https://drone.jonasfranz.software/JonasFranzDEV/gitea-github-migrator)
[![Latest Release](https://img.shields.io/badge/dynamic/json.svg?label=release&url=https%3A%2F%2Fgit.jonasfranz.software%2Fapi%2Fv1%2Frepos%2FJonasFranzDEV%2Fgitea-github-migrator%2Freleases&query=%24%5B0%5D.tag_name)](https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/jonasfranz/gitea-github-migrator.svg)](https://hub.docker.com/r/jonasfranz/gitea-github-migrator/)
A tool to migrate [GitHub](https://github.com) Repositories to [Gitea](https://gitea.io) including all issues, labels, milestones
and comments.
@ -13,11 +15,13 @@ Migrates:
- [x] Milestones
- [x] Comments
- [ ] Users
- [ ] Pull Requests
- [x] Pull Requests (as issue)
- [ ] Statuses
## Installation
### From source
```bash
go get git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
cd $GOPATH/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
@ -25,6 +29,12 @@ dep ensure
go install
```
### From Binary
We provide binaries of master builds and all releases at our [minio storage server](https://storage.h.jonasfranz.software/minio/gitea-github-migrator/dist/).
Additionally we provide them for every release as release attachment under [releases](https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/releases).
You don't need any dependencies except the binary to run the migrator.
## Usage
Migrate one repository:

Loading…
Cancel
Save