Skip to content

Commit

Permalink
Define sections as env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
marians committed Dec 9, 2024
1 parent 897563b commit 901afdc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/check-links-in-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
schedule:
- cron: '39 0 20 * *' # every 20th of the month at 00:39

env:
# space-separated list of the top-level sections to check in https://docs.giantswarm.io/{section}/
SECTIONS: 'getting-started overview reference support tutorials'

jobs:
check-links:
runs-on: ubuntu-latest
Expand All @@ -22,20 +26,13 @@ jobs:
- name: check-links-in-overview-pages
shell: python {0}
continue-on-error: true

run: |
# The different sections we are going to check
sections = [
'getting-started',
'overview',
'reference',
'support',
'tutorials',
]
import os
import subprocess
pwd = os.getcwd()
sections = os.getenv('SECTIONS').split()
for i, section in enumerate(sections):
# call docker run command
Expand Down Expand Up @@ -67,8 +64,10 @@ jobs:
shell: python {0}
run: |
import sys
import os
found_error = False
sections = os.getenv('SECTIONS').split()
for i, section in enumerate(sections):
failed = os.getenv(f"failed{i}")
Expand Down

0 comments on commit 901afdc

Please sign in to comment.