File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 19
19
- name : Checkout repository
20
20
uses : actions/checkout@v4
21
21
22
+ - name : Set up Docker Buildx
23
+ uses : docker/setup-buildx-action@v3
24
+
22
25
- name : Log in to the Container registry
23
26
uses : docker/login-action@v3
24
27
with :
44
47
push : true
45
48
tags : ${{ steps.meta.outputs.tags }}
46
49
labels : ${{ steps.meta.outputs.labels }}
50
+ cache-from : type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-buildcache:bc-publish-${{ github.ref_name }}
51
+ cache-to : type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-buildcache:bc-publish-${{ github.ref_name }},mode=max
Original file line number Diff line number Diff line change @@ -3,12 +3,17 @@ name: Docker test build
3
3
on :
4
4
pull_request :
5
5
6
+ env :
7
+ REGISTRY : ghcr.io
8
+ IMAGE_NAME : ${{ github.repository }}
9
+
6
10
concurrency :
7
11
group : ${{ github.workflow }}-${{ github.ref }}
8
12
cancel-in-progress : true
9
13
10
14
permissions :
11
15
contents : read
16
+ packages : write
12
17
13
18
jobs :
14
19
build-image :
@@ -25,10 +30,22 @@ jobs:
25
30
- name : Checkout repository
26
31
uses : actions/checkout@v4
27
32
33
+ - name : Set up Docker Buildx
34
+ uses : docker/setup-buildx-action@v3
35
+
36
+ - name : Log in to the Container registry
37
+ uses : docker/login-action@v3
38
+ with :
39
+ registry : ${{ env.REGISTRY }}
40
+ username : ${{ github.actor }}
41
+ password : ${{ secrets.GITHUB_TOKEN }}
42
+
28
43
- name : Test docker image build (local development)
29
44
uses : docker/build-push-action@v6
30
45
with :
31
46
context : .
32
47
push : false
33
48
build-args : |
34
49
REQ_FILE=requirements/${{ matrix.req_file }}
50
+ cache-from : type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-buildcache:bc-test-build-${{ matrix.req_file }}
51
+ cache-to : type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-buildcache:bc-test-build-${{ matrix.req_file }},mode=max
You can’t perform that action at this time.
0 commit comments