Skip to content

Commit

Permalink
Merge pull request #572 from Remi-Gau/env_var
Browse files Browse the repository at this point in the history
[FIX] use local var for software name in bootstrap workflow
  • Loading branch information
Remi-Gau authored Sep 3, 2023
2 parents 5da89b8 + 6de8619 commit da4f22c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,6 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: check workflow inputs
run: |
software_name=${{ inputs.software_name }}
if [ -z "$software_name" ]; then
software_name="all"
fi
if [ "$software_name" = "all" ]; then
echo "testing all software"
else
echo "testing ${software_name}"
fi
export SOFTWARE_NAME=${software_name}
- uses: actions/checkout@v3
with:
token: ${{ secrets.CI_FLOW }}
Expand All @@ -79,8 +66,17 @@ jobs:

- name: Create workflows
run: |
software_name=${{ inputs.software_name }}
if [ -z "$software_name" ]; then
software_name="all"
fi
if [ "$software_name" = "all" ]; then
echo "testing all software"
else
echo "testing ${software_name}"
fi
git checkout -b test_docker_build
python .github/workflows/create_workflows.py ${SOFTWARE_NAME}
python .github/workflows/create_workflows.py --software_name ${software_name}
ls -l .github/workflows
git add .
git config --global user.email "no-reply@repronim.org"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ def main(software_name="all"):
choices.append("all")

parser.add_argument(
"--software",
"--software_name",
required=False,
default="all",
choices=choices,
nargs=1,
)
args = parser.parse_args()

main(software_name=args.software[0])
main(software_name=args.software_name[0])

0 comments on commit da4f22c

Please sign in to comment.