PokeAPI/api-data

Run build job only on `master`

Closed this issue · 0 comments

Right now there is an error in our CircleCI's config.yml file and it's executed every time a branch is pushed, not only when the master is pushed. Basically the filter section is ignored

jobs: build: extraneous key [filters] is not permitted

The behavior can be seen here: https://app.circleci.com/pipelines/github/PokeAPI/api-data?branch=testbranch

This is extremely dangerous since broken branches trigger broken updates to our productive landscape.

We should use workflows https://support.circleci.com/hc/en-us/articles/115015953868-Filter-branches-for-jobs-and-workflows