Comments (2)
您好,哔站看到您的视频有这个需求,正好之前做过多平台构建推送,可以添加一个Github Action工作流,自动化多平台构建,并推送到Docker Hub。 看我的fork: https://github.com/RocCheng/sun-panel/blob/master/.github/workflows/docker.yml 多平台的镜像: https://hub.docker.com/r/roccheng/sun-panel/tags
name: 多平台构建 on: # 触发条件,这里我是手动的,可以配置push自动触发 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Set up QEMU # 模拟器,模拟不同平台 uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx # 通过Buildx,构建多平台 uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub # 这里要登陆Docker Hub,需要账户名和一个token,token去Docker Hub生成,然后要在Github项目设置里添加两个secrets,DOCKERHUB_USERNAME 和 DOCKERHUB_TOKEN uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push # 构建推送 uses: docker/build-push-action@v4 with: context: . # 这里在项目根目录找Dockerfile构建 platforms: linux/amd64,linux/arm64 # 可配置多个平台 push: true tags: roccheng/sun-panel # 这里要改成你的Docker Hub 名字
非常感谢你提供的解决方案,正好这几天刚接触到buildx的使用教程,因为之前用的coding持续集成,现在构建多平台,免费时间很短不够用,打算使用虚拟机构建呢,刚好你带来了github的解决方案,方案可用并且很详细,再次感谢。
from sun-panel.
您好,哔站看到您的视频有这个需求,正好之前做过多平台构建推送,可以添加一个Github Action工作流,自动化多平台构建,并推送到Docker Hub。
看我的fork:
https://github.com/RocCheng/sun-panel/blob/master/.github/workflows/docker.yml
多平台的镜像:
https://hub.docker.com/r/roccheng/sun-panel/tags
name: 多平台构建
on:
# 触发条件,这里我是手动的,可以配置push自动触发
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU # 模拟器,模拟不同平台
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx # 通过Buildx,构建多平台
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub # 这里要登陆Docker Hub,需要账户名和一个token,token去Docker Hub生成,然后要在Github项目设置里添加两个secrets,DOCKERHUB_USERNAME 和 DOCKERHUB_TOKEN
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push # 构建推送
uses: docker/build-push-action@v4
with:
context: . # 这里在项目根目录找Dockerfile构建
platforms: linux/amd64,linux/arm64 # 可配置多个平台
push: true
tags: roccheng/sun-panel # 这里要改成你的Docker Hub 名字
from sun-panel.
Related Issues (20)
- 内外网切换的时候,能否根据配置隐藏或显示项目 HOT 1
- 希望可以增加密码箱的功能
- LOGO无法调节大小 HOT 1
- 硬盘信息显示建议多种可选 HOT 1
- [Feature] docker离线激活逻辑探讨 HOT 1
- 希望增加一键修改局域网IP功能 HOT 5
- [BUG] 描述写英文数字不自动换行
- docker.sock文件找不到 HOT 3
- [Feature] 部署到 Vercel
- [Feature] 部署到 cloudflare
- [Feature] 部署到 koyeb 报错 HOT 5
- 关于登入设备授权的建议 HOT 1
- [BUG] 容器更新后面板无法自动适配更新后的容器
- 能否增加单个链接是否公开设置,目前只能分组 公开还是隐藏
- 系统状态组件可以增加一个上传下载速度的功能
- 设置了站点标题,刷新网页还是会显示sun-panel HOT 2
- [BUG] OpenAPI中响应头中,Date有问题
- 缩小图标能否将系统状态图标除外 HOT 2
- [BUG] 在上传文件管理删除文件后,但是在uploads/目录下文件依旧存在
- [BUG] 标题时间块建议使用等宽字体,不然显示秒,会一直抖动
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sun-panel.