|
9 | 9 | # 4. Entry: Month of the year when the process will be started [1-12] |
10 | 10 | # 5. Entry: Weekday when the process will be started [0-6] [0 is Sunday] |
11 | 11 | - cron: '0 8 * * 3' |
| 12 | + # Allow manual triggering of the workflow |
| 13 | + workflow_dispatch: |
12 | 14 |
|
13 | 15 | env: |
14 | 16 | UP_TO_DATE: false |
15 | | - PYTHON_VERSION: "3.10" |
| 17 | + PYTHON_VERSION: "3.13" |
| 18 | + REVIEWERS: "altheaden,xylar,andrewdnolan" |
16 | 19 |
|
17 | 20 | jobs: |
18 | 21 | auto-update: |
19 | 22 | runs-on: ubuntu-latest |
20 | 23 | steps: |
21 | 24 | - uses: actions/checkout@v4 |
22 | 25 |
|
23 | | - - name: Set up Python |
24 | | - uses: actions/setup-python@v5 |
| 26 | + - name: Set up Conda Environment |
| 27 | + uses: mamba-org/setup-micromamba@v2 |
25 | 28 | with: |
26 | | - python-version: ${{ env.PYTHON_VERSION }} |
| 29 | + environment-name: pre_commit_dev |
| 30 | + init-shell: bash |
| 31 | + condarc: | |
| 32 | + channel_priority: strict |
| 33 | + channels: |
| 34 | + - conda-forge |
| 35 | + create-args: >- |
| 36 | + python=${{ env.PYTHON_VERSION }} |
27 | 37 |
|
28 | | - - name: Install pre-commit |
29 | | - run: pip install pre-commit |
| 38 | + - name: Install pre-commit and gh |
| 39 | + run: | |
| 40 | + eval "$(micromamba shell hook --shell bash)" |
| 41 | + micromamba activate pre_commit_dev |
| 42 | + # permissions issue with gh 2.76.0 |
| 43 | + conda install -y pre-commit "gh !=2.76.0" |
| 44 | + gh --version |
30 | 45 |
|
31 | 46 | - name: Apply and commit updates |
32 | 47 | run: | |
| 48 | + eval "$(micromamba shell hook --shell bash)" |
| 49 | + micromamba activate pre_commit_dev |
33 | 50 | git clone https://github.com/E3SM-Project/polaris.git update-pre-commit-deps |
34 | 51 | cd update-pre-commit-deps |
35 | 52 | # Configure git using GitHub Actions credentials. |
|
60 | 77 | --title "Update pre-commit and its dependencies" \ |
61 | 78 | --body "This PR was auto-generated to update pre-commit and its dependencies." \ |
62 | 79 | --head update-pre-commit-deps \ |
63 | | - --reviewer altheaden,xylar \ |
| 80 | + --reviewer ${{ env.REVIEWERS }} \ |
64 | 81 | --label ci |
65 | 82 | env: |
66 | 83 | GH_TOKEN: ${{ github.token }} |
|
0 commit comments