更新 .gitea/workflows/cache-npx.yml
Some checks failed
Some checks failed
This commit is contained in:
parent
1df9978f3c
commit
a3c1d49f5a
@ -21,39 +21,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.npm-cache-dir.outputs.dir }}/_npx
|
||||
key: ${{ runner.os }}-npx
|
||||
key: ${{ runner.os }}-npx-2
|
||||
|
||||
- run: npx cloc .
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.DOCKER_REGISTRY }}
|
||||
username: ${{ env.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.GIT_DOCKER_PASSWORD }}
|
||||
|
||||
- name: Cache docker build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /opt/docker-cache/.build-cache
|
||||
key: ${{ runner.os }}-${{ steps.meta.outputs.REPO_NAME }}-docker-build-cache
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/action-demo:latest
|
||||
cache-from: type=local,src=/opt/docker-cache/.build-cache
|
||||
cache-to: type=local,dest=/opt/docker-cache/.build-cache,mode=max
|
||||
|
Loading…
x
Reference in New Issue
Block a user