summaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-04-02 15:40:09 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-02 15:40:09 +0200
commit03d7c75ebf1b81b12ec21f95eef1c07b265ff939 (patch)
tree511724f53946563a3b7ba1307d25f5bda98ac3a8 /.drone.yml
parent[documentation] Add third-party packaging to documentation (#443) (diff)
downloadgotosocial-03d7c75ebf1b81b12ec21f95eef1c07b265ff939.tar.xz
[chore] Update Go version to 1.18 (#444)
* linting with new golangci-lint version * update go to 1.18 * bump versions in drone.yml * use new runtime/debug package for version info * remove Commit build flag from goreleaser * remove mock commit + version from build script * go fmt * add dummy version env flag to test container * install git in golang container for testing * only set versionString if Version is defined
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml28
1 files changed, 12 insertions, 16 deletions
diff --git a/.drone.yml b/.drone.yml
index 2e07051ad..a96d54649 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -12,7 +12,7 @@ steps:
# We use golangci-lint for linting.
# See: https://golangci-lint.run/
- name: lint
- image: golangci/golangci-lint:v1.43.0
+ image: golangci/golangci-lint:v1.45.2
volumes:
- name: go-build-cache
path: /root/.cache/go-build
@@ -28,13 +28,14 @@ steps:
- pull_request
- name: test
- image: golang:1.17.7-alpine3.14
+ image: golang:1.18-alpine
volumes:
- name: go-build-cache
path: /root/.cache/go-build
- name: go-src
path: /go
commands:
+ - apk update --no-cache && apk add git
- CGO_ENABLED=0 GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test ./...
- CGO_ENABLED=0 ./test/cliparsing.sh
when:
@@ -43,7 +44,7 @@ steps:
- pull_request
- name: snapshot
- image: superseriousbusiness/gotosocial-drone-build:0.0.3 # https://github.com/superseriousbusiness/gotosocial-drone-build
+ image: superseriousbusiness/gotosocial-drone-build:0.0.4 # https://github.com/superseriousbusiness/gotosocial-drone-build
volumes:
- name: go-build-cache
path: /root/.cache/go-build
@@ -72,7 +73,7 @@ steps:
- main
- name: release
- image: superseriousbusiness/gotosocial-drone-build:0.0.3 # https://github.com/superseriousbusiness/gotosocial-drone-build
+ image: superseriousbusiness/gotosocial-drone-build:0.0.4 # https://github.com/superseriousbusiness/gotosocial-drone-build
volumes:
- name: go-build-cache
path: /root/.cache/go-build
@@ -131,24 +132,19 @@ clone:
steps:
- name: mirror
- image: alpine/git
+ image: superseriousbusiness/gotosocial-drone-build:0.0.4
environment:
+ ORIGIN_REPO: https://github.com/superseriousbusiness/gotosocial
+ TARGET_REPO: https://codeberg.org/superseriousbusiness/gotosocial
+ CODEBERG_USER: gotosocialbot
+ CODEBERG_EMAIL: admin@gotosocial.org
CODEBERG_TOKEN:
from_secret: gts_codeberg_token
commands:
- # clone mirror
- - git clone --mirror https://github.com/superseriousbusiness/gotosocial .
- # configure git credentials
- - git config --global user.email "admin@gotosocial.org"
- - git config credential.helper store
- - printf "https://gotosocialbot:${CODEBERG_TOKEN}@codeberg.org\n" >> ~/.git-credentials
- # push mirror
- - git push --mirror https://codeberg.org/superseriousbusiness/gotosocial
- # clean up
- - rm ~/.git-credentials
+ - /go/codeberg_clone.sh
---
kind: signature
-hmac: 40ac973022e4bf7354a30b66ab660c4528be2667d98ff6e859386bfa24fa5dae
+hmac: f3cf4e422d9ce7dc0a881da429db628232e2f9e91383ee5a33cf4f13542c0a23
...