11name : Publish Docker image
22
33on :
4+ workflow_dispatch :
45 release :
56 types : [published]
67
910 name : Push Docker image to Docker Hub
1011 runs-on : ubuntu-latest
1112 steps :
12- - name : Check out the repo
13+ -
14+ name : Check out the repo
1315 uses : actions/checkout@v3
14-
15- - name : Log in to Docker Hub
16- uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
16+ -
17+ name : Log in to Docker Hub
18+ uses : docker/login-action@v2
1719 with :
1820 username : ${{ secrets.DOCKER_USERNAME }}
1921 password : ${{ secrets.DOCKER_PASSWORD }}
2022
21- - name : Extract metadata (tags, labels) for Docker
23+ -
24+ name : Extract metadata (tags, labels) for Docker
2225 id : meta
23- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
26+ uses : docker/metadata-action@v4
2427 with :
2528 images : yidadaa/chatgpt-next-web
29+ tags : |
30+ type=raw,value=latest
31+ type=semver,pattern={{version}}
32+
33+ -
34+ name : Set up QEMU
35+ uses : docker/setup-qemu-action@v2
36+
37+ -
38+ name : Set up Docker Buildx
39+ uses : docker/setup-buildx-action@v2
2640
27- - name : Build and push Docker image
28- uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
41+ -
42+ name : Build and push Docker image
43+ uses : docker/build-push-action@v4
2944 with :
3045 context : .
46+ platforms : linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
3147 push : true
3248 tags : ${{ steps.meta.outputs.tags }}
3349 labels : ${{ steps.meta.outputs.labels }}
50+ cache-from : type=gha
51+ cache-to : type=gha,mode=max
52+
0 commit comments