This commit is contained in:
xRain 2023-08-22 12:04:52 +08:00
parent db9049c457
commit a9b3723e76

View File

@ -6,18 +6,18 @@ runs:
steps:
- uses: docker://node:18
with:
entrypoint: "/bin/bash -c"
entrypoint: "/bin/bash"
args: |
npm install
npm run build -- --outputPath=dist
-c "npm install"
-c " npm run build -- --outputPath=dist"
- uses: docker://docker:git
with:
entrypoint: "/bin/bash -c"
entrypoint: "/bin/bash"
args: |
echo "FROM nginx:alpine" > Dockerfile
echo "COPY dist /usr/share/nginx/html" >> Dockerfile
echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile
docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} .
docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}}
docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}
-c 'echo "FROM nginx:alpine" > Dockerfile'
-c 'echo "COPY dist /usr/share/nginx/html" >> Dockerfile'
-c 'echo "WORKDIR /usr/share/nginx/html/" >> Dockerfile'
-c 'docker build -t ${{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 }}'