Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Cache LFS files in container workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Jul 25, 2023
1 parent cd6013f commit cfd6a95
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,18 @@ jobs:
steps:
- name: Checkout with LFS
uses: actions/checkout@v3.5.3

- name: List LFS Files
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-file-ids

- name: Cache LFS Files
uses: actions/cache@v1.2.1
with:
lfs: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
path: ./git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-asset-ids') }}

- name: Pull LFS Files
run: git lfs pull

- name: Generate Image Name
run: echo IMAGE_REPOSITORY=ghcr.io/$(echo "${{ github.repository }}-${{ matrix.target }}" | tr '[:upper:]' '[:lower:]' | tr '[_]' '[\-]') >> $GITHUB_ENV
Expand Down

0 comments on commit cfd6a95

Please sign in to comment.