Compare commits
No commits in common. "08b36b5dcbed35c9a318ffcfba86eaa1c725e7b5" and "a9b3723e7645d051ad86796db8cf2f2020ab1eb3" have entirely different histories.
08b36b5dcb
...
a9b3723e76
29
action.yml
29
action.yml
@ -4,29 +4,20 @@ description: 'build docker image and push to simcu code'
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: docker://node:20
|
- uses: docker://node:18
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/bash"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c "npm install && \
|
-c "npm install"
|
||||||
npm run build -- --output-path=dist"
|
-c " npm run build -- --outputPath=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://docker:git
|
- uses: docker://docker:git
|
||||||
with:
|
with:
|
||||||
entrypoint: "/bin/sh"
|
entrypoint: "/bin/bash"
|
||||||
args: |
|
args: |
|
||||||
-c 'docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \
|
-c 'echo "FROM nginx:alpine" > Dockerfile'
|
||||||
echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \
|
-c 'echo "COPY dist /usr/share/nginx/html" >> Dockerfile'
|
||||||
docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}} && \
|
-c 'echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile'
|
||||||
docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \
|
-c 'docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} .'
|
||||||
echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}推送成功'
|
-c 'docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}}'
|
||||||
|
-c 'docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}'
|
Loading…
Reference in New Issue
Block a user