Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c64d5a96cb | |||
| 379bacf023 | |||
| ad2420775e | |||
| fe1a62a7b3 | |||
| bf9f6e5cd5 | |||
| 22381f3034 | |||
| 16095bdec5 | |||
| 73ddcf8372 |
40
action.yml
40
action.yml
@@ -1,27 +1,23 @@
|
|||||||
# action.yml
|
# action.yml
|
||||||
name: 'build docker image and push to code'
|
name: "build docker image and push to code"
|
||||||
description: 'build docker image and push to simcu code'
|
description: "build docker image and push to simcu code"
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: docker://node:24
|
- uses: docker://node:24
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/bash"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c "export https_proxy=http://100.100.13.14:8118 && \
|
-c "export https_proxy=http://100.100.13.14:8118 && \
|
||||||
export http_proxy=http://100.100.13.14:8118 && \
|
export http_proxy=http://100.100.13.14:8118 && \
|
||||||
npm pkg set version=${{ github.ref_name }}
|
npm pkg set version=${{ github.ref_name }} && \
|
||||||
npm ci && \
|
npm ci && \
|
||||||
npm run build"
|
npm run build-only"
|
||||||
|
|
||||||
- uses: docker://ubuntu:latest
|
- uses: docker://ubuntu:latest
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/bash"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c 'echo "FROM nginx:alpine" > Dockerfile && \
|
-c 'cp "${{ github.action_path }}/nginx.conf" ./ && cp "${{ github.action_path }}/vue.Dockerfile" ./Dockerfile'
|
||||||
echo "COPY dist /usr/share/nginx/html" >> Dockerfile && \
|
|
||||||
echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile && \
|
|
||||||
echo "已经构建完DOCKERFILE了" && \
|
|
||||||
cat Dockerfile'
|
|
||||||
|
|
||||||
- uses: actions/docker-build-push@main
|
- uses: actions/docker-build-push@main
|
||||||
|
|||||||
9
nginx.conf
Normal file
9
nginx.conf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
3
vue.Dockerfile
Normal file
3
vue.Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
COPY dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
Reference in New Issue
Block a user