variables: docker-step: &docker-step image: docker:rc-git volumes: - /var/run/docker.sock:/var/run/docker.sock environment: NAME: gitea.treehouse.systems/treehouse/mastodon clone: git: image: woodpeckerci/plugin-git settings: partial: false depth: 10 pipeline: build-base: <<: *docker-step commands: - docker version - docker image build -f Dockerfile --build-arg SOURCE_TAG=$CI_COMMIT_SHA . --target build-base -t $NAME:build-base # the world is not yet ready for this step # test: # <<: *docker-step # commands: # - docker run --rm -e RAILS_ENV=test -e NODE_ENV=development $NAME:build-base sh -c 'bundle config set --local without development && bundle install && rake spec' build: <<: *docker-step commands: - 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 push: <<: *docker-step commands: - echo $REGISTRY_SECRET | docker login -u ariadne --password-stdin gitea.treehouse.systems - docker image push --all-tags $NAME when: event: [push, tag] branch: main secrets: [REGISTRY_SECRET]