Skip to content

Commit

Permalink
fix: fixing circle ci config (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
anu1097 authored May 20, 2022
1 parent a609daf commit 6379981
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

aliases:
- &filter-only-main
branches:
only:
- main
- &filter-only-other-branches
branches:
ignore: main
tags:
ignore: /^v[0-9]+(\.[0-9]+)*/

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
Expand All @@ -17,7 +28,7 @@ jobs:
- checkout
- run:
name: Install golangci-lint
command: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.26.0
command: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.26.0
- run:
name: Run lint
command: ./bin/golangci-lint -D errcheck run
Expand Down Expand Up @@ -47,7 +58,14 @@ jobs:
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
build-workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
version: 2
main_workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- build
- build:
filters: *filter-only-main

other_branch_workflow::
jobs:
- build:
filters: *filter-only-other-branches

0 comments on commit 6379981

Please sign in to comment.