mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 01:40:32 +00:00
multi-platform build
Signed-off-by: Alexey Aristov <aav@acm.org>
This commit is contained in:
parent
cba94d6a0c
commit
be5fbbccca
31
.github/workflows/main.yml
vendored
31
.github/workflows/main.yml
vendored
@ -678,14 +678,14 @@ jobs:
|
|||||||
pnpm docker:push
|
pnpm docker:push
|
||||||
|
|
||||||
hulykvs-build:
|
hulykvs-build:
|
||||||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
source_repo: https://github.com/hcengineering/hulykvs.git
|
source_repo: hcengineering/hulykvs
|
||||||
source_ref: v0.1.0
|
source_ref: v0.1.1
|
||||||
docker_user: hardcoreeng
|
docker_user: ${{ vars.DOCKER_USER || 'hardcoreeng' }}
|
||||||
docker_password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
docker_password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
docker_image: "hardcoreeng/hulykvs:${{ github.head_ref || github.ref_name }}"
|
docker_image: "${{ vars.DOCKER_USER || 'hardcoreeng' }}/hulykvs:${{ github.head_ref || github.ref_name }}"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
@ -693,10 +693,23 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ env.docker_user }}
|
username: ${{ env.docker_user }}
|
||||||
password: ${{ env.docker_password }}
|
password: ${{ env.docker_password }}
|
||||||
- name: Clone
|
|
||||||
run: git clone -q --single-branch --branch ${{ env.source_ref }} ${{ env.source_repo }} .
|
- name: Checkout
|
||||||
- name: Build & Push
|
uses: actions/checkout@v4
|
||||||
run: cd hulykvs_server && docker build -t ${{ env.docker_image }} . && docker push ${{ env.docker_image }}
|
with:
|
||||||
|
repository: ${{ env.source_repo }}
|
||||||
|
ref: ${{ env.source_ref }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and Push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: hulykvs_server
|
||||||
|
push: true
|
||||||
|
tags: "${{ env.docker_image }}"
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
dist-build:
|
dist-build:
|
||||||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||||
|
Loading…
Reference in New Issue
Block a user