Generate workflow files with a Jinja template (#2687)

* Generate workflow files with a Jinja template

Fixes #2686

* Remove sudo from allowlist_externals

* Update workflows

* Add condition to skip generate-workflows

* Update workflows

* Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/contrib.yml.j2

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Update workflows

* Update workflows

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
This commit is contained in:
Diego Hurtado
2024-08-06 16:27:38 -06:00
committed by GitHub
parent 2a707bccce
commit f0d8cb39e9
19 changed files with 10051 additions and 284 deletions

View File

@ -0,0 +1,15 @@
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
from pathlib import Path
class CustomBuildHook(BuildHookInterface):
def initialize(self, version, build_data):
with open(
Path(__file__).parent.parent.parent.parent.joinpath("tox.ini")
) as tox_ini_file_0:
with open(
Path(__file__).parent.joinpath("src/generate_workflows_lib/tox.ini"), "w"
) as tox_ini_file_1:
tox_ini_file_1.write(tox_ini_file_0.read())