2025-04-27 22:07:59 +00:00
|
|
|
# https://goreleaser.com/ci/woodpecker/
|
|
|
|
|
# https://woodpecker-ci.org/docs/usage/workflow-syntax#clone
|
|
|
|
|
clone:
|
|
|
|
|
git:
|
|
|
|
|
image: woodpeckerci/plugin-git
|
|
|
|
|
settings:
|
|
|
|
|
tags: true
|
|
|
|
|
|
2025-04-27 11:22:35 +00:00
|
|
|
# https://woodpecker-ci.org/docs/usage/workflow-syntax#when---global-workflow-conditions
|
|
|
|
|
when:
|
2025-04-27 21:33:39 +00:00
|
|
|
- event: push
|
|
|
|
|
branch: main
|
2025-04-27 11:22:35 +00:00
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
snapshot:
|
2025-04-27 13:36:27 +02:00
|
|
|
# https://codeberg.org/superseriousbusiness/gotosocial-drone-build
|
2025-04-27 11:22:35 +00:00
|
|
|
image: superseriousbusiness/gotosocial-drone-build:0.8.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
|