update github action

This commit is contained in:
aichy126 2023-02-07 15:25:31 +08:00
parent 87f96839e2
commit 9cc7b05b08
1 changed files with 3 additions and 16 deletions

View File

@ -2,7 +2,7 @@ name: Build DockerHub Image
on:
push:
branches: [ "main","githubaction" ]
branches: [ "main","githubaction","test" ]
tags:
- v2.*
- v1.*
@ -33,14 +33,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
with:
@ -62,13 +54,8 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
cache-from: type=gha
cache-to: type=gha,mode=max