12 Commits
16.0 ... 20.0

Author SHA1 Message Date
f6fac75ec4 fix 2025-11-07 21:38:26 +08:00
e1ae47bf7c update node 25 2025-11-07 21:37:29 +08:00
770e27acff fix 2025-11-07 21:34:57 +08:00
3376cb924d 更新 action.yml 2025-11-07 21:27:52 +08:00
bcdb5e0c13 add 2024-07-28 22:00:52 +08:00
7e8e38fea6 更新 action.yml 2024-07-28 21:57:59 +08:00
80a3e3fc1b use var instead of env 2024-06-14 02:42:36 +08:00
fec3be94c5 use var instead of env 2024-06-14 02:41:20 +08:00
08b36b5dcb fix bug 2024-05-23 13:29:30 +08:00
dd5f025bc4 fix registry 2024-05-23 11:28:03 +08:00
dee4bfa7e9 revert 2024-04-20 08:14:45 +08:00
94ff66b643 for old angular 11 2024-04-20 08:14:25 +08:00

View File

@@ -1,32 +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 "npm install && \
npm run build -- --output-path=dist"
- uses: docker://ubuntu:latest
with:
entrypoint: "/bin/bash"
args: |
-c 'echo "FROM nginx:alpine" > Dockerfile && \
echo "COPY dist /usr/share/nginx/html" >> Dockerfile && \
echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile && \
echo "已经构建完DOCKERFILE了" && \
cat Dockerfile'
- uses: docker://node:25
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 }}推送成功'
- 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 }}推送成功'