forked from sco1/pre-commit-python-eol
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.21 KB
/
bump_cache.yml
File metadata and controls
51 lines (44 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Check Cached Release Cycle
on:
workflow_dispatch:
schedule:
- cron: "0 14 14 1,4,7,10 *"
jobs:
bump-cache:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.x"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Bump Cache
id: bump
env:
PUBLIC_PAT: ${{ secrets.PUBLIC_PAT }}
run: |
uv sync --no-dev --extra gha
uv run ./pre_commit_python_eol/bump_cache.py
{
echo 'RES<<EOF'
git diff ./pre_commit_python_eol/cached_release_cycle.json
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Open Issue If Bumped
if: ${{ steps.bump.outputs.RES != ''}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
today=$(date +"%Y-%m-%d")
gh issue create \
--title "($today) Release Cycle Cache Outdated" \
--body '\`\`\`diff\n${{ steps.report.outputs.RES }}\n\`\`\`'