From babd1d5d5b40f140697fe644635f391c7c6046c3 Mon Sep 17 00:00:00 2001 From: atheo89 Date: Thu, 19 Dec 2024 11:57:46 +0100 Subject: [PATCH] Update pipfile renewal for 2024a branch --- .github/workflows/piplock-renewal.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/piplock-renewal.yaml b/.github/workflows/piplock-renewal.yaml index f48419a09..772335b59 100644 --- a/.github/workflows/piplock-renewal.yaml +++ b/.github/workflows/piplock-renewal.yaml @@ -3,15 +3,15 @@ name: Pipfile.locks Renewal Action on: # yamllint disable-line rule:truthy - # Triggers the workflow every Monday at 22pm UTC am 0 22 * * 1 - schedule: - - cron: "0 22 * * 1" + # Triggers the workflow every Wednesday at 1am UTC + # schedule: + # - cron: "0 1 * * 3" workflow_dispatch: # for manual trigger workflow from GH Web UI inputs: branch: description: 'Specify branch' required: false - default: 'main' + default: '2024a' python_version: description: 'Select Python version to update Pipfile.lock' required: false @@ -34,12 +34,16 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + env: + BRANCH: ${{ github.event.inputs.branch || '2024a' }} + PYTHON_VERSION: ${{ github.event.inputs.python_version || '3.9' }} + INCLUDE_OPT_DIRS: ${{ github.event.inputs.update_optional_dirs || 'false' }} steps: # Checkout the specified branch from the specified organization - name: Checkout code from the specified branch uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.branch }} + ref: ${{ env.BRANCH }} token: ${{ secrets.GH_ACCESS_TOKEN }} # Configure Git @@ -52,7 +56,7 @@ jobs: - name: Setup Python environment uses: actions/setup-python@v5 with: - python-version: ${{ github.event.inputs.python_version }} + python-version: ${{ env.PYTHON_VERSION }} # Install pipenv - name: Install pipenv @@ -61,7 +65,7 @@ jobs: # Run makefile recipe to refresh Pipfile.lock and push changes back to the branch - name: Run make refresh-pipfilelock-files and push the changes back to the branch run: | - make refresh-pipfilelock-files PYTHON_VERSION=${{ github.event.inputs.python_version }} INCLUDE_OPT_DIRS=${{ github.event.inputs.update_optional_dirs }} + make refresh-pipfilelock-files PYTHON_VERSION=${{ env.PYTHON_VERSION }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }} git add . git commit -m "Update Pipfile.lock files by piplock-renewal.yaml action" - git push origin ${{ github.event.inputs.branch }} + git push origin ${{ env.BRANCH }}