From 1186235e886a1878e78629900416cdbddde87d39 Mon Sep 17 00:00:00 2001 From: Hygna Date: Fri, 10 Feb 2023 19:06:15 +0000 Subject: [PATCH 1/3] Instance json ci --- .woodpecker.yml | 95 ++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 37 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index bce6cb8..96dcc31 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,20 +1,20 @@ pipeline: - dockerize: - when: - branch: [main, master] - event: [push] - image: woodpeckerci/plugin-docker-buildx - settings: - dockerfile: Dockerfile - registry: https://codeberg.org/v2 - repo: codeberg.org/gothub/gothub - platforms: linux/amd64,linux/arm64 - tag: latest - username: - from_secret: user - password: - from_secret: passwd - secrets: [user, passwd] + dockerize: + when: + branch: main, master + event: push + image: woodpeckerci/plugin-docker-buildx + settings: + dockerfile: Dockerfile + registry: https://codeberg.org/v2 + repo: codeberg.org/gothub/gothub + platforms: linux/amd64,linux/arm64 + tag: latest + username: + from_secret: user + password: + from_secret: passwd + secrets: [user, passwd] #dockerize-arm64: # environment: # - GOOS=linux @@ -32,32 +32,30 @@ pipeline: # from_secret: passwd # # password = key or actual password # tags: arm64 - - dockerize-dev: - when: - event: [push] - branch: [dev] - image: woodpeckerci/plugin-docker-buildx - settings: - dockerfile: Dockerfile - registry: https://codeberg.org/v2 - repo: codeberg.org/gothub/gothub - platforms: linux/amd64,linux/arm64 - tag: dev - username: - from_secret: user - password: - from_secret: passwd - secrets: [user, passwd] - + dockerize-dev: + when: + event: push + branch: dev + image: woodpeckerci/plugin-docker-buildx + settings: + dockerfile: Dockerfile + registry: https://codeberg.org/v2 + repo: codeberg.org/gothub/gothub + platforms: linux/amd64,linux/arm64 + tag: dev + username: + from_secret: user + password: + from_secret: passwd + secrets: [user, passwd] #dockerize-dev-arm64: # environment: # - ARCH= # - GOOS=linux # - GOARCH=arm64 # when: - # event: [push] - # branch: [dev] + # event: push + # branch: dev # image: plugins/docker # settings: # registry: codeberg.org @@ -69,4 +67,27 @@ pipeline: # # password = key or actual password # tags: ${CI_COMMIT_SHA:0:8}-arm64 # dockerfile: Dockerfile-arm64 - # # You can thank the drone docker maintainer for not providing a buildx option. \ No newline at end of file + # # You can thank the drone docker maintainer for not providing a buildx option. + instancejson: + image: python:3-bullseye + secrets: [ssh_key, mail] + when: + path: "README.md" + branch: dev + commands: + - git clone https://codeberg.org/gothub/gothub-instances instances + - cd instances + - pip install -r requirements.txt + - ./main.py + # SSH configuration + - mkdir ~/.ssh + - ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts + - eval `ssh-agent` + - echo "$SSH_KEY" | tr -d '\r' | ssh-add - + # Git configuration + - git clone git@codeberg.org:gothub/gothub-instances.git + - git config --global user.email $MAIL + - git config --global user.name "Woodpecker CI" + - git add instances.json + - git commit -m "updated instances" + - git push -u origin dev From e9c3364ab6dea4251c57990b66657ffe105664b1 Mon Sep 17 00:00:00 2001 From: Hygna Date: Fri, 10 Feb 2023 19:25:41 +0000 Subject: [PATCH 2/3] Fixed capitalization of commit message --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 96dcc31..0ec7fff 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -89,5 +89,5 @@ pipeline: - git config --global user.email $MAIL - git config --global user.name "Woodpecker CI" - git add instances.json - - git commit -m "updated instances" + - git commit -m "Updated instances" - git push -u origin dev From dba335f0a88ed37aa93abf12ce7b7f8a76a3109c Mon Sep 17 00:00:00 2001 From: Odyssium Date: Fri, 10 Feb 2023 19:31:21 +0000 Subject: [PATCH 3/3] Add GO_TELEMETRY notice (totally not to test the new CI) Signed-off-by: Odyssium --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8d02209..2cb4419 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ If you are using Portainer or Podman, you know how to create the GotHub containe ### Manual You will need an installation of Go 1.19+ installed on your system. + +We recommend setting the `GO_TELEMETRY` environment variable to `off`. In the future, the Go CLI will send telemetry to Google, which you might not want. + ```bash git clone https://codeberg.org/gothub/gothub.git cd gothub