version: 2 jobs: fast_tests: machine: image: ubuntu-2004:202111-02 steps: - checkout - run: command: | cd .circleci && ./run-tests.sh "Fast=Fast|ThirdParty=ThirdParty" && ./can-build.sh selenium_tests: machine: image: ubuntu-2004:202111-02 steps: - checkout - run: command: | cd .circleci && ./run-tests.sh "Selenium=Selenium" integration_tests: machine: image: ubuntu-2004:202111-02 steps: - checkout - run: command: | cd .circleci && ./run-tests.sh "Integration=Integration" trigger_docs_build: machine: image: ubuntu-2004:202111-02 steps: - run: command: | curl -X POST -H "Authorization: token $GH_PAT" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/btcpayserver/btcpayserver-doc/dispatches --data '{"event_type": "build_docs"}' # publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined docker: docker: - image: cimg/base:stable steps: - setup_remote_docker - checkout - run: command: | LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag GIT_COMMIT=$(git rev-parse HEAD) # docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS docker buildx create --use DOCKER_BUILDX_OPTS="--platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg GIT_COMMIT=${GIT_COMMIT} --push" docker buildx build $DOCKER_BUILDX_OPTS -t $DOCKERHUB_REPO:$LATEST_TAG . docker buildx build $DOCKER_BUILDX_OPTS -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins --build-arg CONFIGURATION_NAME=Altcoins-Release . workflows: version: 2 build_and_test: jobs: - fast_tests - selenium_tests - integration_tests publish: jobs: - trigger_docs_build: filters: branches: ignore: /.*/ # only act on version tags tags: only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/ - docker: filters: # ignore any commit on any branch by default branches: ignore: /.*/ # only act on version tags v1.0.0.88 or v1.0.2-1 # OR feature tags like vlndseedbackup # OR features on specific versions like v1.0.0.88-lndseedbackup-1 tags: only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/