Skip to content

Commit

Permalink
add ci builder
Browse files Browse the repository at this point in the history
  • Loading branch information
drivebyer committed Mar 26, 2024
1 parent 4eb5472 commit edd0a05
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release_manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
- 'ot-redis-upstream'
- 'zoo-entrance'
- 'logical-backup'
- 'ci-builder'
upstream-ref:
description: 'upstream ref'
required: false
Expand All @@ -40,6 +41,37 @@ env:
BUILD_PLATFORM: linux/amd64,linux/arm64

jobs:
ci-builder:
if : ${{ inputs.job == 'ci-builder' }}
runs-on: ubuntu-latest
steps:
- name: Git clone repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: ci-builder
uses: docker/[email protected]
with:
context: ./arm64/images/ci-builder
file: ./arm64/images/ci-builder/Dockerfile
github-token: ${{ secrets.GITHUB_TOKEN }}
push: true
platforms: ${{ env.BUILD_PLATFORM }}
tags: |
${{ env.ONLINE_REGISTER }}/ci-builder:${{ inputs.tag }}
${{ env.ONLINE_REGISTER }}/ci-builder:latest
cache-from: type=gha
cache-to: type=gha,mode=max
logical-backup:
if : ${{ inputs.job == 'logical-backup' }}
runs-on: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions arm64/images/ci-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:1.21.8-alpine3.19

# install make
RUN apk upgrade --no-cache && \
apk add --no-cache make protobuf && \
go env -w GOPROXY=https://goproxy.cn,direct && \
go install google.golang.org/protobuf/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected] && \
go install github.com/grpc-ecosystem/grpc-gateway/v2/[email protected] && \
go install github.com/grpc-ecosystem/grpc-gateway/v2/[email protected] && \
go install github.com/golang/mock/[email protected] && \
go install github.com/jstemmer/go-junit-report@latest && \
go install github.com/grpc-ecosystem/[email protected] && \
go install github.com/favadi/protoc-go-inject-tag@latest && \
go install github.com/go-swagger/go-swagger/cmd/[email protected]

ENTRYPOINT ["/bin/sh"]

0 comments on commit edd0a05

Please sign in to comment.