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 pipeline: build: <<: *docker-step commands: - docker version - 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]