mirror of
https://github.com/actions/cache.git
synced 2026-06-11 16:53:46 +08:00
Compare commits
1 Commits
42a4682f30
...
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
|
||||||
|
|||||||
@@ -195,7 +195,6 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us
|
|||||||
* [Clojure - Lein Deps](./examples.md#clojure---lein-deps)
|
* [Clojure - Lein Deps](./examples.md#clojure---lein-deps)
|
||||||
* [D - DUB](./examples.md#d---dub)
|
* [D - DUB](./examples.md#d---dub)
|
||||||
* [Deno](./examples.md#deno)
|
* [Deno](./examples.md#deno)
|
||||||
* [Docker](./examples.md#docker)
|
|
||||||
* [Elixir - Mix](./examples.md#elixir---mix)
|
* [Elixir - Mix](./examples.md#elixir---mix)
|
||||||
* [Go - Modules](./examples.md#go---modules)
|
* [Go - Modules](./examples.md#go---modules)
|
||||||
* [Haskell - Cabal](./examples.md#haskell---cabal)
|
* [Haskell - Cabal](./examples.md#haskell---cabal)
|
||||||
|
|||||||
35
examples.md
35
examples.md
@@ -10,7 +10,6 @@
|
|||||||
- [Linux](#linux)
|
- [Linux](#linux)
|
||||||
- [macOS](#macos)
|
- [macOS](#macos)
|
||||||
- [Windows](#windows-1)
|
- [Windows](#windows-1)
|
||||||
- [Docker](#docker)
|
|
||||||
- [Elixir - Mix](#elixir---mix)
|
- [Elixir - Mix](#elixir---mix)
|
||||||
- [Erlang - Rebar3](#erlang--rebar3)
|
- [Erlang - Rebar3](#erlang--rebar3)
|
||||||
- [Go - Modules](#go---modules)
|
- [Go - Modules](#go---modules)
|
||||||
@@ -177,40 +176,6 @@ steps:
|
|||||||
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
|
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Cache Docker layers
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: /tmp/.buildx-cache
|
|
||||||
key: my-project-${{ matrix.arch }}-buildx-${{ hashFiles('my-directory/Dockerfile') }}
|
|
||||||
restore-keys: |
|
|
||||||
my-project-${{ matrix.arch }}-buildx-
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Build and Test
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
push: false
|
|
||||||
context: .
|
|
||||||
platforms: ${{ matrix.arch }}
|
|
||||||
file: my-directory/Dockerfile
|
|
||||||
tags: my-username/my-image:latest
|
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
|
||||||
-
|
|
||||||
# Temporary workaround
|
|
||||||
# https://github.com/docker/build-push-action/issues/252
|
|
||||||
# https://github.com/moby/buildkit/issues/1896
|
|
||||||
name: Move cache
|
|
||||||
run: |
|
|
||||||
rm -rf /tmp/.buildx-cache
|
|
||||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
|
||||||
```
|
|
||||||
|
|
||||||
## Elixir - Mix
|
## Elixir - Mix
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user