mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-28 13:52:25 -05:00
As described! Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4073 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
56 lines
2 KiB
YAML
56 lines
2 KiB
YAML
# https://woodpecker-ci.org/docs/usage/workflow-syntax#when---global-workflow-conditions
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
# https://goreleaser.com/ci/woodpecker/
|
|
# https://woodpecker-ci.org/docs/usage/workflow-syntax#clone
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
tags: true
|
|
|
|
steps:
|
|
snapshot:
|
|
# https://codeberg.org/superseriousbusiness/gotosocial-woodpecker-build
|
|
image: superseriousbusiness/gotosocial-woodpecker-build:0.10.0
|
|
pull: true
|
|
|
|
# https://woodpecker-ci.org/docs/usage/volumes
|
|
volumes:
|
|
- /woodpecker/gotosocial/go-build-cache-root:/root/.cache/go-build
|
|
- /woodpecker/gotosocial/go-pkg-cache-root:/go/pkg
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
# https://woodpecker-ci.org/docs/usage/environment
|
|
# https://woodpecker-ci.org/docs/usage/secrets#usage
|
|
environment:
|
|
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"
|
|
|
|
# https://woodpecker-ci.org/docs/usage/workflow-syntax#commands
|
|
commands:
|
|
# Create a snapshot build with GoReleaser.
|
|
- git fetch --tags
|
|
- goreleaser release --clean --snapshot
|
|
|
|
# Login to Docker, push Docker image snapshots + manifests.
|
|
- /go/dockerlogin.sh
|
|
- docker push superseriousbusiness/gotosocial:snapshot-arm64v8
|
|
- docker push superseriousbusiness/gotosocial:snapshot-amd64
|
|
- |
|
|
docker manifest create superseriousbusiness/gotosocial:snapshot \
|
|
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
|