Skip to content

Commit

Permalink
Merge pull request #4 from nschloe/inexclude
Browse files Browse the repository at this point in the history
add include/exclude
  • Loading branch information
nschloe authored Mar 11, 2022
2 parents d3fc115 + 23e8c05 commit 6377ed7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Nico Schlömer
Copyright (c) 2021-2022 Nico Schlömer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Simply replace the above by
```yaml
- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1
# Use these to explicitly include/exclude files:
# with:
# include: "*"
# exclude: ""
```

Check it out [on the GitHub
Expand Down
13 changes: 12 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@ branding:
icon: "download"
color: "green"

inputs:
include:
description: "Explicitly include files for LFS"
required: false
default: "*"
exclude:
description: "Explicitly exclude files for LFS"
required: false
default: ""

runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
run: |
git lfs ls-files -l --include ${{ inputs.include }} --exclude ${{ inputs.exclude }}. | cut -d ' ' -f1 | sort > .lfs-assets-id
shell: bash

- name: Restore LFS cache
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version := "1.0.1"
version := "1.1.0"

default:
@echo "\"just publish\"?"
Expand Down

0 comments on commit 6377ed7

Please sign in to comment.