Here is my config.yaml
version: 2.1
executors:
docker-publisher:
environment:
IMAGE_NAME: mocking-service
docker:
- image: circleci/buildpack-deps:stretch
jobs:
build:
executor: docker-publisher
steps:
- checkout
- setup_remote_docker
- run:
name: Build Docker image
command: |
docker build -t $NEXUS_REPO/$IMAGE_NAME:latest .
- run:
name: Archive Docker image
command: docker save -o mocking.tar $NEXUS_REPO/$IMAGE_NAME
- persist_to_workspace:
root: .
paths:
- ./mocking.tar
publish-latest:
executor: docker-publisher
steps:
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load archived Docker image
command: docker load -i /tmp/workspace/mocking.tar
- run:
name: Show images
command: docker images
- run:
name: Publish Docker Image to Nexus
command: |
docker login --username=$NEXUS_USERNAME --password=$NEXUS_PASSWORD $NEXUS_REPO
docker push $NEXUS_REPO/$IMAGE_NAME:latest
workflows:
version: 2
build-and-publish-image-to-nexus:
jobs:
- build:
filters:
tags:
only: /^tag-*/
- publish-latest:
requires:
- build
filters:
tags:
only : /^tag-*/
branches:
ignore: /-*/
can some one help me with why my builds are not triggered on pushing the tag. I checked the web hooks on github and they look perfectly fine to me and my tag name always starts with βtag-β
I tried to use this solution but no luck Build/workflow not triggered when tag is pushed