mirror of
https://github.com/openobserve/goflow2.git
synced 2025-11-02 13:03:18 +00:00
build: add container registry workflow (#200)
This commit is contained in:
39
.github/workflows/docker_registry_github.yml
vendored
Normal file
39
.github/workflows/docker_registry_github.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Docker Registry GitHub
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Docker Registry GitHub
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go 1.x
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ^1.21
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
DOCKER_SUFFIX=-amd64 DOCKER_CMD='buildx build --push --platform linux/amd64' make docker
|
||||||
|
DOCKER_SUFFIX=-arm64 DOCKER_CMD='buildx build --push --platform linux/arm64/v8' make docker
|
||||||
|
make docker-manifest-buildx
|
||||||
Reference in New Issue
Block a user