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

Cache LFS files when in container workflow #52

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: true
path: ./git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-asset-ids') }}
garryod marked this conversation as resolved.
Show resolved Hide resolved

- 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
Loading