I’m trying to run a workflow only on tags, but I’m getting no workflow
And when I remove ignore branches, it runs on every branch and tag.
Do I miss something? Or what exactly can I achieve with this usecase?
This is a screenshot, and I’m expecting the workflow to run on instable-2.7.31.
Screenshot- noworkflow
Thanks.
My .circleci/config.yml
only-deploy-unstable: &only-deploy-unstable
context: Unstable-context
filters:
tags:
only: /^unstable-.*/
branches:
ignore: /.*/
version: 2.1
jobs:
build_unstable:
docker:
- image: docker:20.10.8
environment:
DOCKER_IMAGE_BASE_URL: **********
steps:
- checkout
- setup_remote_docker
- run: apk update
- run: apk add git
- run: docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- run:
name: build and push unstable docker image
no_output_timeout: 15m
command: |
export TAG_NAME=$(git describe --tags --abbrev=0)
echo ${DOCKER_IMAGE_BASE_URL}:$TAG_NAME
docker build --build-arg STAGING=test --rm -t $DOCKER_IMAGE_BASE_URL:$TAG_NAME -t $DOCKER_IMAGE_BASE_URL:latest .
docker push $DOCKER_IMAGE_BASE_URL:$TAG_NAME
docker push $DOCKER_IMAGE_BASE_URL:latest
deploy_unstable:
docker:
- image: docker:20.10.8
steps:
- checkout
- setup_remote_docker
- run: command -v ssh-agent >/dev/null || ( apk add --update openssh )
- run: eval $(ssh-agent -s)
- run: ********************
workflows:
# build unstable-version
build_and_push_unstable:
jobs:
- build_unstable: *only-deploy-unstable
- hold:
<<: *only-deploy-unstable
type: approval
requires:
- build_unstable
- deploy_unstable:
<<: *only-deploy-unstable
requires:
- hold