def register_from_packs(self, base_dirs):
        """
        Discover all the packs in the provided directory and register actions from all of the
        discovered packs.

        :return: Number of actions registered, Number of actions overridden
        :rtype: ``tuple``
        """
        # Register packs first
        self.register_packs(base_dirs=base_dirs)

        registered_count = 0
        overridden_count = 0
        content = self._pack_loader.get_content(
            base_dirs=base_dirs, content_type="actions"
        )

        for pack, actions_dir in six.iteritems(content):
            if not actions_dir:
                LOG.debug("Pack %s does not contain actions.", pack)
                continue
            try:
                LOG.debug(
                    "Registering actions from pack %s:, dir: %s", pack, actions_dir
                )
                actions = self._get_actions_from_pack(actions_dir)
                count, overridden = self._register_actions_from_pack(
                    pack=pack, actions=actions
                )
                registered_count += count
                overridden_count += overridden
            except Exception as e:
                if self._fail_on_failure:
                    raise e

                LOG.exception(
                    "Failed registering all actions from pack: %s", actions_dir
                )

        return registered_count, overridden_count

        Discover all the packs in the provided directory and register actions from all of the
        discovered packs.

        :return: Number of actions registered, Number of actions overridden
        :rtype: ``tuple``
        
st2common/st2common/bootstrap/actionsregistrar.py