From 770e27acfff61bd4d4fffe38d5a11501cc81cc25 Mon Sep 17 00:00:00 2001 From: xRain Date: Fri, 7 Nov 2025 21:34:57 +0800 Subject: [PATCH] fix --- action.yml | 60 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/action.yml b/action.yml index a800853..f9a4704 100644 --- a/action.yml +++ b/action.yml @@ -1,34 +1,34 @@ # action.yml -name: 'build docker image and push to code' -description: 'build docker image and push to simcu code' +name: "build docker image and push to code" +description: "build docker image and push to simcu code" runs: - using: 'composite' + using: "composite" steps: - - uses: docker://node:20 - with: - entrypoint: "/bin/bash" - args: | - -c "export https_proxy=http://100.100.13.14:8118 && \ - export http_proxy=http://100.100.13.14:8118 && \ - npm install && \ - npm run build -- --output-path=dist --define AppVersion="'${{ github.ref_name }}'"" - - - uses: docker://ubuntu:latest - with: - entrypoint: "/bin/bash" - args: | - -c 'echo "FROM nginx:alpine" > Dockerfile && \ - echo "COPY dist/browser /usr/share/nginx/html" >> Dockerfile && \ - echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile && \ - echo "已经构建完DOCKERFILE了" && \ - cat Dockerfile' + - uses: docker://node:20 + with: + entrypoint: "/bin/bash" + args: | + -c "export https_proxy=http://100.100.13.14:8118 && \ + export http_proxy=http://100.100.13.14:8118 && \ + npm install && \ + npm run build -- --output-path=dist --define AppVersion="'${{github.ref_name}}'" - - uses: docker://docker:git - with: - entrypoint: "/bin/sh" - args: | - -c 'docker build -t ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \ - echo ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \ - docker login ${{vars.DOCKER_REGISTRY}} -u ${{vars.DOCKER_USER}} -p ${{vars.DOCKER_PASS}} && \ - docker push ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \ - echo ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}推送成功' \ No newline at end of file + - uses: docker://ubuntu:latest + with: + entrypoint: "/bin/bash" + args: | + -c 'echo "FROM nginx:alpine" > Dockerfile && \ + echo "COPY dist/browser /usr/share/nginx/html" >> Dockerfile && \ + echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile && \ + echo "已经构建完DOCKERFILE了" && \ + cat Dockerfile' + + - uses: docker://docker:git + with: + entrypoint: "/bin/sh" + args: | + -c 'docker build -t ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \ + echo ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \ + docker login ${{vars.DOCKER_REGISTRY}} -u ${{vars.DOCKER_USER}} -p ${{vars.DOCKER_PASS}} && \ + docker push ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \ + echo ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}推送成功'