ai-cfia / howard

The Howard project, named after "The Godfather of Clouds" Luke Howard, orchestrates the Kubernetes-based cloud infrastructure for the Canadian Food Inspection Agency's AI lab, managing applications like Nachet, Finesse, and Louis. It prioritizes robustness, security and efficiency
https://ai-cfia.github.io/howard/
MIT License
3 stars 0 forks source link

Update python lint workflow to fetch dynamically values from github secrets. #281

Closed SonOfLope closed 2 weeks ago

SonOfLope commented 2 weeks ago

In order to enhance the workflow for testing python projects through our reusable workflow, we need a solution that fetches variables dynamically instead of listing them in the script. This will save time for everyone of having to do a PR on the github-workflows repo to add or remove env variables needed for the tests.

The following is a working example that demonstrates that we can fetch them dynamically :

name: test-echo-env-vars

on:
  push:
    branches:
      - main

jobs:
  test-printing-env-vars:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v2

    - run: |
        echo "$ALLMYSECRETS"
        echo "$ALLMYVARS"
      shell: bash
      env:
        ALLMYSECRETS: ${{ toJSON(secrets) }}
        ALLMYVARS: ${{ toJSON(vars) }}