Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching #53

Open
steveoh opened this issue Mar 22, 2022 · 1 comment
Open

Caching #53

steveoh opened this issue Mar 22, 2022 · 1 comment

Comments

@steveoh
Copy link

steveoh commented Mar 22, 2022

I'd like to cache the dependencies that this action downloads to speed up the sequential runs. Is this a feature you would want to add to this action or would you rather users use the action/cache action to do this on their own and if so what folder should we cache and what file should we use to hash for the changes/updates check?

go: downloading github.com/aquasecurity/tfsec v1.13.0
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/aquasecurity/defsec v0.25.0
go: downloading github.com/liamg/tml v0.6.0
go: downloading github.com/spf13/cobra v1.4.0
go: downloading github.com/owenrumney/go-sarif/v2 v2.1.1
go: downloading github.com/owenrumney/go-sarif v1.1.1
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/zclconf/go-cty v1.[10](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:10).0
go: downloading github.com/liamg/clinch v1.5.6
go: downloading github.com/liamg/gifwrap v0.0.6
go: downloading github.com/hashicorp/go-version v1.4.0
go: downloading github.com/inconshreveable/go-update v0.0.0-20160[11](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:11)2193335-8152e7eb6ccf
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/open-policy-agent/opa v0.38.1
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading github.com/owenrumney/squealer v0.3.1
go: downloading github.com/liamg/iamgo v0.0.6
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/hashicorp/hcl/v2 v2.11.1
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/zclconf/go-cty-yaml v1.0.2
go: downloading github.com/mattn/go-runewidth v0.0.[12](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:12)
go: downloading github.com/mattn/go-runewidth v0.0.[13](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:13)
go: downloading golang.org/x/text v0.3.7
go: downloading golang.org/x/crypto v0.0.0-20220208233918-bba287dce954
go: downloading golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064
go: downloading github.com/gdamore/tcell/v2 v2.2.0
go: downloading github.com/gdamore/tcell/v2 v2.4.0
go: downloading github.com/gdamore/tcell v1.4.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/OneOfOne/xxhash v1.2.8
go: downloading github.com/ghodss/yaml v1.0.0
go: downloading github.com/liamg/jfather v0.0.7
go: downloading github.com/agext/levenshtein v1.2.3
go: downloading github.com/apparentlymart/go-textseg/v13 v13.0.0
go: downloading github.com/apparentlymart/go-textseg v1.0.0
go: downloading github.com/mitchellh/go-wordwrap v1.0.0
go: downloading github.com/mitchellh/go-wordwrap v1.0.1
go: downloading github.com/apparentlymart/go-cidr v1.1.0
go: downloading github.com/bmatcuk/doublestar v1.3.4
go: downloading github.com/hashicorp/go-uuid v1.0.2
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading golang.org/x/term v0.0.0-20210503060354-a79de5458b56
go: downloading github.com/gdamore/encoding v1.0.0
go: downloading golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
go: downloading github.com/lucasb-eyer/go-colorful v1.0.3
go: downloading golang.org/x/sys v0.0.0-202201[14](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:14)195835-da31bd327af9
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading golang.org/x/sys v0.0.0-20220319134239-a9b59b02[15](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:15)f8
go: downloading github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
go: downloading github.com/xeipuuv/gojsonreference v0.0.0-20[18](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:18)01[27](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:27)0[40](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:40)603-bd5ef7bd5[41](https://github.com/agrc/gcp-terraform/runs/5648592829?check_suite_focus=true#step:5:41)5
go: downloading github.com/gobwas/glob v0.2.3
@triat
Copy link
Owner

triat commented Apr 7, 2022

Hi @steveoh,

This makes total sense to cache the dependencies. I would stick with the actions/cache as this has been done exactly for this purpose.

Now, I can't answer what is required to be cached. I would look at the tool's repository directly to have more information about it. You can also have a look at this example that caches Go modules: https://github.com/actions/cache/blob/main/examples.md#go---modules

If you have a working example, I'd be interested to add it to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants