use cache from github workflows

This commit is contained in:
ggman12
2026-02-01 21:01:31 -05:00
parent 70cc0ab490
commit 2763e923fc
2 changed files with 21 additions and 17 deletions
+21 -6
View File
@@ -44,8 +44,25 @@ jobs:
print(f"::set-output name=matrix::{json.dumps(ranges)}")
EOF
clone-faa-repo:
runs-on: ubuntu-latest
steps:
- name: Cache FAA repository
id: cache-faa-repo
uses: actions/cache@v4
with:
path: data/scrape-faa-releasable-aircraft
key: faa-repo-v1
- name: Clone FAA repository
if: steps.cache-faa-repo.outputs.cache-hit != 'true'
run: |
mkdir -p data
git clone https://github.com/simonw/scrape-faa-releasable-aircraft data/scrape-faa-releasable-aircraft
echo "Repository cloned successfully"
process-chunk:
needs: generate-matrix
needs: [generate-matrix, clone-faa-repo]
runs-on: ubuntu-latest
strategy:
max-parallel: 5 # Process 5 chunks at a time
@@ -60,14 +77,12 @@ jobs:
with:
python-version: '3.12'
- name: Cache FAA repository
id: cache-faa-repo
uses: actions/cache@v4
- name: Restore FAA repository cache
uses: actions/cache/restore@v4
with:
path: data/scrape-faa-releasable-aircraft
key: faa-repo-v1
restore-keys: |
faa-repo-v1
fail-on-cache-miss: true
- name: Install dependencies
run: |
-11
View File
@@ -24,17 +24,6 @@ args = parser.parse_args()
# Clone repository if it doesn't exist
REPO = Path("data/scrape-faa-releasable-aircraft")
if not REPO.exists():
print(f"Cloning repository to {REPO}...")
subprocess.run([
"git", "clone",
"https://github.com/simonw/scrape-faa-releasable-aircraft",
str(REPO)
], check=True)
print("Repository cloned successfully.")
else:
print(f"Repository already exists at {REPO}")
OUT_ROOT = Path("data/faa_releasable_historical")
OUT_ROOT.mkdir(parents=True, exist_ok=True)