Compare commits
4 Commits
a9b3723e76
...
15.0
Author | SHA1 | Date | |
---|---|---|---|
54b179e80f | |||
c6ca641436 | |||
cf0ff6b888 | |||
a402fd2191 |
27
action.yml
27
action.yml
@ -8,16 +8,25 @@ runs:
|
|||||||
with:
|
with:
|
||||||
entrypoint: "/bin/bash"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c "npm install"
|
-c "npm install && \
|
||||||
-c " npm run build -- --outputPath=dist"
|
npm run build -- --output-path=dist"
|
||||||
|
|
||||||
- uses: docker://docker:git
|
- uses: docker://ubuntu:latest
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/bash"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c 'echo "FROM nginx:alpine" > Dockerfile'
|
-c 'echo "FROM nginx:alpine" > Dockerfile && \
|
||||||
-c 'echo "COPY dist /usr/share/nginx/html" >> Dockerfile'
|
echo "COPY dist /usr/share/nginx/html" >> Dockerfile && \
|
||||||
-c 'echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile'
|
echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile && \
|
||||||
-c 'docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} .'
|
echo "已经构建完DOCKERFILE了" && \
|
||||||
-c 'docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}}'
|
cat Dockerfile'
|
||||||
-c 'docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ 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 }}推送成功'
|
Reference in New Issue
Block a user