-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b9e035
commit 0077933
Showing
8 changed files
with
65 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: picture_api | ||
|
||
on: [push] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 检出代码 | ||
uses: actions/checkout@v2 | ||
- name: 设置Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: 构建镜像 | ||
run: | | ||
docker build -t picture_api -f ./dockerfile . | ||
- name: 导出镜像 | ||
run: | | ||
docker save picture_api | gzip > picture_api.tar.gz | ||
- name: 上传镜像 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: picture_api | ||
path: picture_api.tar.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# 使用官方 Node.js 16 版本的镜像作为基础镜像 | ||
FROM node:16 | ||
FROM node:18 | ||
|
||
# 设置工作目录,容器内所有后续命令都在这个目录中进行 | ||
WORKDIR /usr/src/app | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## 随机图片 | ||
> GET /v1/images | ||
返回数据: | ||
|
||
**type:Buffer** | ||
|
||
![本地图片](./demo.jpg) | ||
|
||
## 指定图片 | ||
> GET /v1/images/:id | ||
返回数据: | ||
|
||
**type:Buffer** | ||
|
||
![本地图片](./demo.jpg) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters