Skip to content

Commit

Permalink
Update pipfile renewal for 2024a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
atheo89 committed Dec 19, 2024
1 parent 3dd9f34 commit babd1d5
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/piplock-renewal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit babd1d5

Please sign in to comment.