mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-11-16 11:33:40 +00:00
build vuepress docker image
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
This commit is contained in:
parent
8952dee0a8
commit
683cf95ca7
3
.github/workflows/check-link.yml
vendored
3
.github/workflows/check-link.yml
vendored
@ -12,6 +12,7 @@ jobs:
|
|||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
# search Issues :-(
|
||||||
- run: |
|
- run: |
|
||||||
docker run -i --rm \
|
docker run -i --rm \
|
||||||
-v $PWD:/mnt:ro \
|
-v $PWD:/mnt:ro \
|
||||||
@ -56,6 +57,8 @@ jobs:
|
|||||||
"en.wikipedia.org/wiki/UnionFS",\
|
"en.wikipedia.org/wiki/UnionFS",\
|
||||||
"product.china-pub.com",\
|
"product.china-pub.com",\
|
||||||
"union-click.jd.com",\
|
"union-click.jd.com",\
|
||||||
|
"x.x.x.x/base",\
|
||||||
|
"x.x.x.x:9000/minio/",\
|
||||||
"www.aliyun.com" \
|
"www.aliyun.com" \
|
||||||
--allow-dupe \
|
--allow-dupe \
|
||||||
--skip-save-results \
|
--skip-save-results \
|
||||||
|
21
.github/workflows/ci.yaml
vendored
21
.github/workflows/ci.yaml
vendored
@ -67,3 +67,24 @@ jobs:
|
|||||||
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
|
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
|
||||||
PCIT_TARGET_BRANCH: master
|
PCIT_TARGET_BRANCH: master
|
||||||
PCIT_USERNAME: ptt0xjqzbke3
|
PCIT_USERNAME: ptt0xjqzbke3
|
||||||
|
- name: Build vuepress docker image
|
||||||
|
if: github.repository == 'docker-practice/docker_practice'
|
||||||
|
run: |
|
||||||
|
sudo rm -rf .vuepress/dist/.git
|
||||||
|
|
||||||
|
echo "FROM nginx:alpine" >> Dockerfile
|
||||||
|
echo "COPY .vuepress/dist /usr/share/nginx/html" >> Dockerfile
|
||||||
|
|
||||||
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
|
||||||
|
VCS_REF=`git rev-parse --short HEAD`
|
||||||
|
|
||||||
|
docker build -t dockerpracticesig/docker_practice:vuepress \
|
||||||
|
--label org.opencontainers.image.revision=$VCS_REF \
|
||||||
|
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
|
||||||
|
.
|
||||||
|
|
||||||
|
docker push dockerpracticesig/docker_practice:vuepress
|
||||||
|
env:
|
||||||
|
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
||||||
|
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
|
||||||
|
10
.travis.yml
10
.travis.yml
@ -22,14 +22,22 @@ after_success:
|
|||||||
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
|
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
|
||||||
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
- export VCS_REF=`git rev-parse --short HEAD`
|
||||||
|
- |
|
||||||
|
docker build \
|
||||||
|
-t dockerpracticesig/docker_practice \
|
||||||
|
-t dockerpracticesig/docker_practice:gitbook \
|
||||||
|
--label org.opencontainers.image.revision=$VCS_REF \
|
||||||
|
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
|
||||||
|
.
|
||||||
|
|
||||||
- docker build -t dockerpracticesig/docker_practice .
|
|
||||||
- docker run -dit --rm -p 4000:80 dockerpracticesig/docker_practice
|
- docker run -dit --rm -p 4000:80 dockerpracticesig/docker_practice
|
||||||
|
|
||||||
- sleep 5
|
- sleep 5
|
||||||
- curl 127.0.0.1:4000
|
- curl 127.0.0.1:4000
|
||||||
|
|
||||||
- docker push dockerpracticesig/docker_practice
|
- docker push dockerpracticesig/docker_practice
|
||||||
|
- docker push dockerpracticesig/docker_practice:gitbook
|
||||||
|
|
||||||
- cd _book
|
- cd _book
|
||||||
- rm -rf .github/workflows
|
- rm -rf .github/workflows
|
||||||
|
Loading…
Reference in New Issue
Block a user