Compare commits
1 Commits
0.01
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db21c2e027 |
61
.github/workflows/build.yaml
vendored
61
.github/workflows/build.yaml
vendored
@@ -1,61 +0,0 @@
|
||||
name: Virtual Kubelet Docker Build and Deploy
|
||||
on:
|
||||
release:
|
||||
types: [created] # 仅在创建Release时触发,也可选择published、edited等
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 输出触发信息
|
||||
run: |
|
||||
echo "🎉 该作业由 ${{ github.event_name }} 事件自动触发。"
|
||||
echo "🐧 此作业当前在 GitHub 托管的 ${{ runner.os }} 服务器上运行!"
|
||||
echo "🔎 您的发布版本是 ${{ github.ref_name }},仓库是 ${{ github.repository }}。"
|
||||
|
||||
- name: 检出仓库代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 输出工作区信息
|
||||
run: |
|
||||
echo "💡 ${{ github.repository }} 仓库已克隆到运行器。"
|
||||
echo "🖥️ 工作流现在已准备好在运行器上测试您的代码。"
|
||||
ls -la ${{ github.workspace }}
|
||||
echo "🍏 此作业的状态是 ${{ job.status }}。"
|
||||
|
||||
- name: 设置 Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: 从标签名中提取版本号
|
||||
id: extract_version
|
||||
run: |
|
||||
# 从Release标签名中提取版本号,例如从 v0.1.0 中提取 v0.1.0
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's|refs/tags/||')
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "提取的版本号:$VERSION"
|
||||
|
||||
- name: 登录 Docker 注册表
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.cn-beijing.aliyuncs.com
|
||||
username: ${{ secrets.ALI_DOCKER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.ALI_DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: 构建并推送 Virtual Kubelet 镜像
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile # 确保Dockerfile路径正确
|
||||
push: true
|
||||
tags: |
|
||||
registry.cn-beijing.aliyuncs.com/d8dcloud/virtual-kubelet:${{ env.VERSION }}
|
||||
registry.cn-beijing.aliyuncs.com/d8dcloud/virtual-kubelet:latest
|
||||
build-args: |
|
||||
GOLANG_CI_LINT_VERSION=v1.68.0
|
||||
BUILD_TAGS=""
|
||||
labels: |
|
||||
org.opencontainers.image.title=Virtual Kubelet
|
||||
org.opencontainers.image.description=Kubernetes Virtual Kubelet implementation
|
||||
org.opencontainers.image.version=${{ env.VERSION }}
|
||||
org.opencontainers.image.source=${{ github.repositoryUrl }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
2
go.mod
2
go.mod
@@ -22,7 +22,7 @@ require (
|
||||
go.opentelemetry.io/otel v1.36.0
|
||||
go.opentelemetry.io/otel/sdk v1.36.0
|
||||
go.opentelemetry.io/otel/trace v1.36.0
|
||||
golang.org/x/sync v0.14.0
|
||||
golang.org/x/sync v0.15.0
|
||||
golang.org/x/time v0.9.0
|
||||
google.golang.org/protobuf v1.36.6
|
||||
gotest.tools v2.2.0+incompatible
|
||||
|
||||
4
go.sum
4
go.sum
@@ -429,8 +429,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
|
||||
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
Reference in New Issue
Block a user