mirror of
https://github.com/actions/cache.git
synced 2026-06-11 16:53:46 +08:00
Compare commits
1 Commits
38038ad0e5
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
745332c95a |
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
# with:
|
# with:
|
||||||
# languages: go, javascript, csharp, python, cpp, java, ruby
|
# languages: go, javascript, csharp, python, cpp, java, ruby
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below).
|
# If this step fails, then you should remove it and run the build manually (see below).
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v4
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@@ -42,4 +42,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
|
|||||||
25
examples.md
25
examples.md
@@ -25,7 +25,6 @@
|
|||||||
- [Node - Yarn](#node---yarn)
|
- [Node - Yarn](#node---yarn)
|
||||||
- [Node - Yarn 2](#node---yarn-2)
|
- [Node - Yarn 2](#node---yarn-2)
|
||||||
- [OCaml/Reason - esy](#ocamlreason---esy)
|
- [OCaml/Reason - esy](#ocamlreason---esy)
|
||||||
- [OCaml/Reason - opam](#ocamlreason---opam)
|
|
||||||
- [PHP - Composer](#php---composer)
|
- [PHP - Composer](#php---composer)
|
||||||
- [Python - pip](#python---pip)
|
- [Python - pip](#python---pip)
|
||||||
- [Simple example](#simple-example)
|
- [Simple example](#simple-example)
|
||||||
@@ -438,30 +437,6 @@ Esy allows you to export built dependencies and import pre-built dependencies.
|
|||||||
if: steps.restore-cache.outputs.cache-hit != 'true'
|
if: steps.restore-cache.outputs.cache-hit != 'true'
|
||||||
```
|
```
|
||||||
|
|
||||||
## OCaml/Reason - opam
|
|
||||||
|
|
||||||
This example requires you to have `opam.locked` file which you can generate with `opam lock .`.
|
|
||||||
|
|
||||||
It's worth noting that even if lock file was change, it might be optimal to restore previous cache, so `hashFiles` in the key and if statement in "Save opam cache" step are optional.
|
|
||||||
```yaml
|
|
||||||
- name: Restore opam cache
|
|
||||||
id: restore-cache
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
path: _opam
|
|
||||||
key: ${{ runner.os }}-opam-${{ hashFiles('opam.locked') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: opam install . --locked --deps-only -y
|
|
||||||
|
|
||||||
- name: Save opam cache
|
|
||||||
if: steps.restore-cache.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: _opam
|
|
||||||
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
|
||||||
```
|
|
||||||
|
|
||||||
## PHP - Composer
|
## PHP - Composer
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user