forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (64 loc) · 1.76 KB
/
_cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Cache prime (docker)
permissions:
contents: read
on:
workflow_call:
secrets:
app-id:
required: true
app-key:
required: true
inputs:
image-tag:
type: string
required: true
request:
type: string
required: true
lock-repository:
type: string
default: envoyproxy/ci-mutex
## Docker cache
#
# This workflow will only prime the cache, and should be done separately first, prior
# to any jobs that require it.
#
# For a job that does, you can restore with something like:
#
# steps:
# - uses: envoyproxy/toolshed/gh-actions/docker/cache/restore@actions-v0.2.30
# with:
# key: "${{ needs.env.outputs.build-image }}"
#
jobs:
docker:
runs-on: ubuntu-22.04
steps:
- uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0.2.31
id: appauth
name: Appauth (mutex lock)
with:
app_id: ${{ secrets.app-id }}
key: ${{ secrets.app-key }}
- uses: envoyproxy/toolshed/gh-actions/docker/cache/prime@actions-v0.2.31
id: docker
name: Prime Docker cache (${{ inputs.image-tag }})
with:
image-tag: ${{ inputs.image-tag }}
lock-token: ${{ steps.appauth.outputs.token }}
lock-repository: ${{ inputs.lock-repository }}
- uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.2.31
id: data
name: Cache data
with:
input-format: yaml
input: |
cached: ${{ steps.docker.outputs.cached }}
key: ${{ inputs.image-tag }}
- uses: envoyproxy/toolshed/gh-actions/json/table@actions-v0.2.31
name: Summary
with:
json: ${{ steps.data.outputs.value }}
output-path: GITHUB_STEP_SUMMARY
title: >-
Cache (Docker x64)