[feature] Add snapshot binary builds + uploads (#2119)

* [feature] Add snapshot binary builds + uploads

* Update docs to include info on snapshot builds

* review comments

* little tweaks
This commit is contained in:
tobi 2023-08-15 18:48:17 +02:00 committed by GitHub
commit 42bb352d53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 59 additions and 6 deletions

View file

@ -81,7 +81,7 @@ steps:
- yarn run build
- name: snapshot
image: superseriousbusiness/gotosocial-drone-build:0.2.0 # https://github.com/superseriousbusiness/gotosocial-drone-build
image: superseriousbusiness/gotosocial-drone-build:0.3.0 # https://github.com/superseriousbusiness/gotosocial-drone-build
volumes:
- name: go-build-cache
path: /root/.cache/go-build
@ -91,16 +91,28 @@ steps:
DOCKER_USERNAME: gotosocial
DOCKER_PASSWORD:
from_secret: gts_docker_password
S3_ACCESS_KEY_ID:
from_secret: gts_s3_access_key_id
S3_SECRET_ACCESS_KEY:
from_secret: gts_s3_secret_access_key
S3_HOSTNAME: "https://s3.superseriousbusiness.org"
S3_BUCKET_NAME: "gotosocial-snapshots"
commands:
# Create a snapshot build with GoReleaser.
- git fetch --tags
- /go/dockerlogin.sh
- goreleaser release --rm-dist --snapshot
- docker push superseriousbusiness/gotosocial:snapshot-armv6 &&
# Login to Docker, push Docker image snapshots + manifests.
- /go/dockerlogin.sh
- docker push superseriousbusiness/gotosocial:snapshot-armv6
- docker push superseriousbusiness/gotosocial:snapshot-armv7
- docker push superseriousbusiness/gotosocial:snapshot-arm64v8
- docker push superseriousbusiness/gotosocial:snapshot-amd64
- docker manifest create superseriousbusiness/gotosocial:snapshot superseriousbusiness/gotosocial:snapshot-armv6 superseriousbusiness/gotosocial:snapshot-armv7 superseriousbusiness/gotosocial:snapshot-amd64 superseriousbusiness/gotosocial:snapshot-arm64v8
- docker manifest push superseriousbusiness/gotosocial:snapshot
# Publish binary .tar.gz snapshots to S3.
- /go/snapshot_publish.sh
when:
event:
include:
@ -110,7 +122,7 @@ steps:
- main
- name: release
image: superseriousbusiness/gotosocial-drone-build:0.2.0 # https://github.com/superseriousbusiness/gotosocial-drone-build
image: superseriousbusiness/gotosocial-drone-build:0.3.0 # https://github.com/superseriousbusiness/gotosocial-drone-build
volumes:
- name: go-build-cache
path: /root/.cache/go-build
@ -169,7 +181,7 @@ clone:
steps:
- name: mirror
image: superseriousbusiness/gotosocial-drone-build:0.2.0
image: superseriousbusiness/gotosocial-drone-build:0.3.0
environment:
ORIGIN_REPO: https://github.com/superseriousbusiness/gotosocial
TARGET_REPO: https://codeberg.org/superseriousbusiness/gotosocial
@ -182,6 +194,6 @@ steps:
---
kind: signature
hmac: 946c2ffd4e79de07a767ec06ebac0a8ca70a03ce5666aae093c9b0af455041d1
hmac: 74653d67ed44ceefb7e19d6125d4a457e6308b5ef627df6325d72a0cc7d7cc0a
...