glitchier-soc/.woodpecker.yml

40 lines
1 KiB
YAML
Raw Normal View History

2023-03-17 06:09:27 +02:00
variables:
docker-step: &docker-step
2022-12-29 00:27:57 +02:00
image: docker:rc-git
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2023-03-17 06:09:27 +02:00
environment:
NAME: gitea.treehouse.systems/treehouse/mastodon
pipeline:
build:
<<: *docker-step
2022-11-12 12:50:24 +02:00
commands:
2022-12-29 00:27:57 +02:00
- docker version
2023-03-17 06:09:27 +02:00
- docker image build -f Dockerfile --build-arg SOURCE_TAG=$CI_COMMIT_SHA . -t $NAME:latest
- docker tag $NAME:latest $NAME:$CI_COMMIT_SHA
tag-nightly:
<<: *docker-step
commands:
- docker tag $NAME:latest $NAME:$(date -Idate -u)
# maybe we can use tags someday,,,
# tag-tag:
# image: *docker-git
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# commands:
# - docker tag $NAME:latest $NAME:$CI_COMMIT_TAG
# when:
# event: tag
2022-11-12 12:50:24 +02:00
push:
2023-03-17 06:09:27 +02:00
<<: *docker-step
2022-11-12 12:50:24 +02:00
commands:
- echo $REGISTRY_SECRET | docker login -u ariadne --password-stdin gitea.treehouse.systems
2023-03-17 06:09:27 +02:00
- docker image push --all-tags $NAME
2022-11-12 12:50:24 +02:00
when:
event: [push, tag]
branch: main
2022-11-12 16:08:48 +02:00
secrets: [REGISTRY_SECRET]