File tree 1 file changed +20
-12
lines changed
1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,25 @@ jobs:
17
17
- name : Checkout code
18
18
uses : actions/checkout@v2
19
19
20
- - name : Log in to GitHub Container Registry
21
- uses : docker/login-action @v2
20
+ - name : Cache Docker layers
21
+ uses : actions/cache @v2
22
22
with :
23
- registry : ghcr.io
24
- username : ${{ github.actor }}
25
- password : ${{ secrets.GITHUB_TOKEN }}
26
-
27
- - name : Build Docker image
28
- run : |
29
- docker build -t ghcr.io/irobot-algorithm/sentry_navigation:latest .
30
-
31
- - name : Push Docker image
23
+ path : /tmp/.buildx-cache
24
+ key : ${{ runner.os }}-buildx-${{ github.sha }}
25
+ restore-keys : |
26
+ ${{ runner.os }}-buildx-
27
+
28
+ - name : Set up QEMU
29
+ uses : docker/setup-qemu-action@v1
30
+
31
+ - name : Set up Docker Buildx
32
+ uses : docker/setup-buildx-action@v1
33
+
34
+ - name : Login to GitHub Container Registry
35
+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
36
+
37
+ - name : Build and push Docker images
32
38
run : |
33
- docker push ghcr.io/irobot-algorithm/sentry_navigation:latest
39
+ docker buildx build --platform linux/amd64,linux/arm64 \
40
+ -t ghcr.io/irobot-algorithm/sentry_navigation:latest \
41
+ --push .
You can’t perform that action at this time.
0 commit comments