更新 .gitea/workflows/cache-npx.yml
Some checks failed
Gitea Actions Demo / build-docker (push) Successful in 25s
Gitea Actions Demo / setup (push) Failing after 17s
Gitea Actions Demo / test (push) Has been skipped
Gitea Actions Demo / build (push) Has been skipped
Cache Npx / task (push) Successful in 1m43s

This commit is contained in:
huanghs 2024-08-17 17:25:22 +08:00
parent 22b6d50e0a
commit 1df9978f3c

View File

@ -44,12 +44,6 @@ jobs:
path: /opt/docker-cache/.build-cache path: /opt/docker-cache/.build-cache
key: ${{ runner.os }}-${{ steps.meta.outputs.REPO_NAME }}-docker-build-cache key: ${{ runner.os }}-${{ steps.meta.outputs.REPO_NAME }}-docker-build-cache
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(echo ${{ github.ref }} | awk -F"/" '{print $3}' | awk -F"v" '{print $2}') >> $GITHUB_OUTPUT
- name: Build and push - name: Build and push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
@ -60,6 +54,6 @@ jobs:
linux/arm64 linux/arm64
push: true push: true
tags: | tags: |
${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/action-demo:${{ steps.meta.outputs.REPO_VERSION }} ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/action-demo:latest
cache-from: type=local,src=/opt/docker-cache/.build-cache cache-from: type=local,src=/opt/docker-cache/.build-cache
cache-to: type=local,dest=/opt/docker-cache/.build-cache,mode=max cache-to: type=local,dest=/opt/docker-cache/.build-cache,mode=max