workflows: tags refactoring

* Reduces complexity of the code.

* Improves performances.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>