github actioins 和 gitea actions 有没有比较好的例子参考,比如我要 build 一个 docker image 并发布到 k8s 里

201 天前
 xinmans
网上资源不多啊
1191 次点击
所在节点    Kubernetes
7 条回复
zhixiao
201 天前
好巧,我刚好在看 gitea action 发布镜像倒 gitea 自身的软件包里,应该也可以看看,反正 github 和 gitea action 基本是兼容的:

```
name: Build test image
run-name: ${{ github.actor }} is testing out Gitea Actions
on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Login to gitea
uses: docker/login-action@v3
with:
registry: example.com
username: test
password: password
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: example.com/test/test-image:${{github.ref_name}}
```
Morii
201 天前
我刚才问了下 GPT-4, 结果就不贴了,看了下基本符合你的要求
l4ever
201 天前
gitea actions 完全兼容 github.
rbe
201 天前
https://docs.github.com/zh/actions/examples/using-scripts-to-test-your-code-on-a-runner

官方文档有简中翻译版的。
为啥会觉得网上资源不多?随便点进一些热门开源项目,大概率有 .github 目录,点进去里面都是可以照着抄的例子。
xinmans
201 天前
@rbe 好方法
xinmans
201 天前
@zhixiao thanks
qloog
200 天前
有一个部署到 aws 的 EKS(k8s)服务的, 基于 Golang 版本,可供参考:
https://github.com/go-eagle/eagle/blob/master/.github/workflows/deploy.yml
镜像服务也是在 aws 上。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/983700

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX