Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] use local var for software name in bootstrap workflow #572

Merged
merged 1 commit into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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])