@@ -6,23 +6,20 @@ concurrency:
66 group : ${{ github.workflow }}-${{ github.ref }}
77 cancel-in-progress : true
88
9- permissions :
10- contents : read
9+ permissions : {}
1110
1211jobs :
1312 docker :
1413 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
1514 runs-on : ubuntu-24.04
1615
1716 permissions :
17+ contents : read
1818 packages : write
1919
2020 steps :
21- - uses : actions/checkout@v4
22-
23- - name : Docker meta
21+ - uses : docker/metadata-action@v5
2422 id : meta
25- uses : docker/metadata-action@v5
2623 with :
2724 images : | # add potential Docker Hub image
2825 ghcr.io/${{ github.repository_owner }}/motioneye
@@ -33,16 +30,10 @@ jobs:
3330 type=semver,pattern={{major}}
3431
3532 - uses : docker/setup-qemu-action@v3
36- - uses : docker/setup-buildx-action@v3
37-
38- - name : Cache Docker layers
39- uses : actions/cache@v4
4033 with :
41- path : |
42- ${{ runner.temp }}/.buildx-cache
43- key : ${{ runner.os }}-buildx-${{ github.sha }}
44- restore-keys : |
45- ${{ runner.os }}-buildx-
34+ cache-image : false
35+
36+ - uses : docker/setup-buildx-action@v3
4637
4738 # - name: Login to Docker Hub
4839 # uses: docker/login-action@v3
@@ -59,22 +50,10 @@ jobs:
5950 username : ${{ github.actor }}
6051 password : ${{ github.token }}
6152
62- - name : Build
63- uses : docker/build-push-action@v6
53+ - uses : docker/build-push-action@v6
6454 with :
65- context : .
6655 file : ./docker/Dockerfile
6756 platforms : linux/amd64,linux/arm64/v8,linux/arm/v7,linux/riscv64
6857 push : ${{ github.event_name == 'push' && github.repository == 'motioneye-project/motioneye' && steps.meta.outputs.tags != null }}
6958 tags : ${{ steps.meta.outputs.tags }}
7059 labels : ${{ steps.meta.outputs.labels }}
71- # build-args: |
72- # KEY1=Value1
73- # KEY2=Value2
74- cache-from : type=local,src=${{ runner.temp }}/.buildx-cache
75- cache-to : type=local,dest=${{ runner.temp }}/.buildx-cache-new
76-
77- - name : Move cache
78- run : |
79- rm -rf ${{ runner.temp }}/.buildx-cache
80- mv ${{ runner.temp }}/.buildx-cache-new ${{ runner.temp }}/.buildx-cache
0 commit comments