Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1050 from zheng1/refactor_with_ks
Browse files Browse the repository at this point in the history
Add builder into github actions
  • Loading branch information
zheng1 committed Nov 23, 2020
2 parents 37b5753 + 9a5222c commit e8183da
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 51 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/docker-flyway.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/docker.yml
Expand Up @@ -11,6 +11,70 @@ on:
pull_request:

jobs:
docker-flyway:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: openpitrix/openpitrix-flyway
tag-sha: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./pkg/db/
file: ./pkg/db/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

docker-builder:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: openpitrix/openpitrix-builder
tag-sha: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./build/builder-docker
file: ./build/builder-docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

docker:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion build/builder-docker/Dockerfile
Expand Up @@ -30,7 +30,7 @@ RUN mkdir -p /protoc && cd /protoc \

FROM golang:1.13-alpine

RUN apk add --no-cache git protobuf make curl openssl jq rsync upx build-base
RUN apk add --no-cache git protobuf make curl openssl jq rsync build-base

COPY --from=builder /protoc/include /usr/local/include
COPY --from=builder /go/bin /go/bin

0 comments on commit e8183da

Please sign in to comment.