-
Notifications
You must be signed in to change notification settings - Fork 86
57 lines (51 loc) · 1.76 KB
/
test-gha.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
name: test-gha
on:
push:
branches:
- test-docker-gha
jobs:
test-gha:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: builder1
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: |
usr-local-cargo-git-db
usr-local-cargo-registry-cache
usr-local-cargo-registry-index
src-target
key: cache-${{ hashFiles('openssl-cross-docker-build/Dockerfile') }}
- name: inject cache into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"usr-local-cargo-git-db": "/usr/local/cargo/git/db",
"usr-local-cargo-registry-cache": "/usr/local/cargo/registry/cache",
"usr-local-cargo-registry-index": "/usr/local/cargo/registry/index",
"src-target": "/src/target"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- uses: crazy-max/ghaction-github-runtime@v3
- run: cd openssl-cross-docker-build &&
mkdir -p output/ &&
docker build --progress=plain
--builder ${{ steps.builder1.outputs.name }}
--cache-from=type=gha,scope=$platform
--cache-to=type=gha,scope=$platform,mode=max
--platform linux/arm/v7
--output=type=local,dest=output/
-t testf .
# - name: Build and push Docker image
# uses: docker/build-push-action@v5
# with:
# context: openssl-cross-docker-build
# file: openssl-cross-docker-build/Dockerfile
# cache-from: type=gha
# cache-to: type=gha,mode=max