Skip to content

Commit d566002

Browse files
committed
ci: Configure env to build documentation with correct versions
This is not ideal, we need to define all these variables here because we need to calculate all the repository version information to be able to show the correct versions in the documentation when building it. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent b4f6a73 commit d566002

File tree

7 files changed

+56
-0
lines changed
  • .github/workflows
  • cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows
  • tests_golden/integration/test_cookiecutter_generation
    • actor/frequenz-actor-test/.github/workflows
    • api/frequenz-api-test/.github/workflows
    • app/frequenz-app-test/.github/workflows
    • lib/frequenz-test-python/.github/workflows
    • model/frequenz-model-test/.github/workflows

7 files changed

+56
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,14 @@ jobs:
351351
VERSION: ${{ steps.mike-version.outputs.version }}
352352
TITLE: ${{ steps.mike-version.outputs.title }}
353353
ALIASES: ${{ steps.mike-version.outputs.aliases }}
354+
# This is not ideal, we need to define all these variables here
355+
# because we need to calculate all the repository version information
356+
# to be able to show the correct versions in the documentation when
357+
# building it.
358+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
359+
GITHUB_REPO: ${{ github.repository }}
360+
GIT_REF: ${{ github.ref }}
361+
GIT_SHA: ${{ github.sha }}
354362
run: |
355363
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
356364

cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,14 @@ jobs:
376376
VERSION: ${{ steps.mike-version.outputs.version }}
377377
TITLE: ${{ steps.mike-version.outputs.title }}
378378
ALIASES: ${{ steps.mike-version.outputs.aliases }}
379+
# This is not ideal, we need to define all these variables here
380+
# because we need to calculate all the repository version information
381+
# to be able to show the correct versions in the documentation when
382+
# building it.
383+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
384+
GITHUB_REPO: ${{ github.repository }}
385+
GIT_REF: ${{ github.ref }}
386+
GIT_SHA: ${{ github.sha }}
379387
run: |
380388
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
381389

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,14 @@ jobs:
348348
VERSION: ${{ steps.mike-version.outputs.version }}
349349
TITLE: ${{ steps.mike-version.outputs.title }}
350350
ALIASES: ${{ steps.mike-version.outputs.aliases }}
351+
# This is not ideal, we need to define all these variables here
352+
# because we need to calculate all the repository version information
353+
# to be able to show the correct versions in the documentation when
354+
# building it.
355+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
356+
GITHUB_REPO: ${{ github.repository }}
357+
GIT_REF: ${{ github.ref }}
358+
GIT_SHA: ${{ github.sha }}
351359
run: |
352360
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
353361

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,14 @@ jobs:
371371
VERSION: ${{ steps.mike-version.outputs.version }}
372372
TITLE: ${{ steps.mike-version.outputs.title }}
373373
ALIASES: ${{ steps.mike-version.outputs.aliases }}
374+
# This is not ideal, we need to define all these variables here
375+
# because we need to calculate all the repository version information
376+
# to be able to show the correct versions in the documentation when
377+
# building it.
378+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
379+
GITHUB_REPO: ${{ github.repository }}
380+
GIT_REF: ${{ github.ref }}
381+
GIT_SHA: ${{ github.sha }}
374382
run: |
375383
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
376384

tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,14 @@ jobs:
348348
VERSION: ${{ steps.mike-version.outputs.version }}
349349
TITLE: ${{ steps.mike-version.outputs.title }}
350350
ALIASES: ${{ steps.mike-version.outputs.aliases }}
351+
# This is not ideal, we need to define all these variables here
352+
# because we need to calculate all the repository version information
353+
# to be able to show the correct versions in the documentation when
354+
# building it.
355+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
356+
GITHUB_REPO: ${{ github.repository }}
357+
GIT_REF: ${{ github.ref }}
358+
GIT_SHA: ${{ github.sha }}
351359
run: |
352360
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
353361

tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,14 @@ jobs:
348348
VERSION: ${{ steps.mike-version.outputs.version }}
349349
TITLE: ${{ steps.mike-version.outputs.title }}
350350
ALIASES: ${{ steps.mike-version.outputs.aliases }}
351+
# This is not ideal, we need to define all these variables here
352+
# because we need to calculate all the repository version information
353+
# to be able to show the correct versions in the documentation when
354+
# building it.
355+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
356+
GITHUB_REPO: ${{ github.repository }}
357+
GIT_REF: ${{ github.ref }}
358+
GIT_SHA: ${{ github.sha }}
351359
run: |
352360
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
353361

tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,14 @@ jobs:
348348
VERSION: ${{ steps.mike-version.outputs.version }}
349349
TITLE: ${{ steps.mike-version.outputs.title }}
350350
ALIASES: ${{ steps.mike-version.outputs.aliases }}
351+
# This is not ideal, we need to define all these variables here
352+
# because we need to calculate all the repository version information
353+
# to be able to show the correct versions in the documentation when
354+
# building it.
355+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
356+
GITHUB_REPO: ${{ github.repository }}
357+
GIT_REF: ${{ github.ref }}
358+
GIT_SHA: ${{ github.sha }}
351359
run: |
352360
mike deploy --update-aliases --title "$TITLE" "$VERSION" $ALIASES
353361

0 commit comments

Comments
 (0)