|
3 | 3 | name: Pipfile.locks Renewal Action
|
4 | 4 |
|
5 | 5 | on: # yamllint disable-line rule:truthy
|
6 |
| - # Triggers the workflow every Monday at 22pm UTC am 0 22 * * 1 |
| 6 | + # Triggers the workflow every Wednesday at 1am UTC |
7 | 7 | schedule:
|
8 |
| - - cron: "0 22 * * 1" |
| 8 | + - cron: "0 1 * * 3" |
9 | 9 | workflow_dispatch: # for manual trigger workflow from GH Web UI
|
10 | 10 | inputs:
|
11 | 11 | branch:
|
@@ -35,12 +35,16 @@ jobs:
|
35 | 35 | runs-on: ubuntu-latest
|
36 | 36 | permissions:
|
37 | 37 | contents: write
|
| 38 | + env: |
| 39 | + BRANCH: ${{ github.event.inputs.branch || 'main' }} |
| 40 | + PYTHON_VERSION: ${{ github.event.inputs.python_version || '3.11' }} |
| 41 | + INCLUDE_OPT_DIRS: ${{ github.event.inputs.update_optional_dirs || 'false' }} |
38 | 42 | steps:
|
39 | 43 | # Checkout the specified branch from the specified organization
|
40 | 44 | - name: Checkout code from the specified branch
|
41 | 45 | uses: actions/checkout@v4
|
42 | 46 | with:
|
43 |
| - ref: ${{ github.event.inputs.branch }} |
| 47 | + ref: ${{ env.BRANCH }} |
44 | 48 | token: ${{ secrets.GH_ACCESS_TOKEN }}
|
45 | 49 |
|
46 | 50 | # Configure Git
|
|
53 | 57 | - name: Setup Python environment
|
54 | 58 | uses: actions/setup-python@v5
|
55 | 59 | with:
|
56 |
| - python-version: ${{ github.event.inputs.python_version }} |
| 60 | + python-version: ${{ env.PYTHON_VERSION }} |
57 | 61 |
|
58 | 62 | # Install pipenv
|
59 | 63 | - name: Install pipenv
|
|
62 | 66 | # Run makefile recipe to refresh Pipfile.lock and push changes back to the branch
|
63 | 67 | - name: Run make refresh-pipfilelock-files and push the changes back to the branch
|
64 | 68 | run: |
|
65 |
| - make refresh-pipfilelock-files PYTHON_VERSION=${{ github.event.inputs.python_version }} INCLUDE_OPT_DIRS=${{ github.event.inputs.update_optional_dirs }} |
| 69 | + make refresh-pipfilelock-files PYTHON_VERSION=${{ env.PYTHON_VERSION }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }} |
66 | 70 | git add .
|
67 | 71 | git commit -m "Update Pipfile.lock files by piplock-renewal.yaml action"
|
68 |
| - git push origin ${{ github.event.inputs.branch }} |
| 72 | + git push origin ${{ env.BRANCH }} |
0 commit comments