-
Notifications
You must be signed in to change notification settings - Fork 37
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
Showing
4 changed files
with
39 additions
and
11 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,38 @@ | ||
name: 推送开发用的 docker 镜像 | ||
on: | ||
push: | ||
branches: | ||
- 'develop' | ||
|
||
jobs: | ||
push_to_registry: | ||
name: 推送到 Docker Hub | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# https://github.com/actions/checkout | ||
- name: 拉取代码 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: develop | ||
|
||
# https://github.com/docker/login-action | ||
- name: 登录到 Docker hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# https://github.com/docker/setup-buildx-action | ||
- name: 使用 buildx 作为构建器 | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
# https://github.com/docker/build-push-action | ||
- name: 构建并推送 | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
push: true | ||
tags: develop | ||
platforms: linux/amd64,linux/arm64 |
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
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