Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 43 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,51 @@
name: My workflow
on:
push:
branches:
- main
paths:
- ".github/workflows/test.yaml"
- ".github/actions/checkout/actions.yaml"
- ".github/actions/test/actions.yaml"
on:
pull_request:
paths:
- ".github/workflows/test.yaml"
- ".github/actions/checkout/actions.yaml"
- ".github/actions/test/actions.yaml"


env:
# PLATFORMS: "linux/amd64,linux/arm64"
PLATFORMS: "linux/arm64"

jobs:
job:
name: test-job
runs-on: ubuntu-latest
steps:
- uses: "./.github/actions/test"
- run: "echo hello"
- uses: actions/checkout@v4
- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:master
platforms: ${{ env.PLATFORMS }}
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
platforms: ${{ env.PLATFORMS }}
driver-opts: |
image=moby/buildkit:master
network=host
buildkitd-flags: "--debug --oci-worker-gc=false"
- name: docker run
run: |
docker run --rm --platform linux/arm64 vdaas/vald-agent-ngt:v1.7.10
# - name: Setup Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v3
# with:
# version: latest
# platforms: ${{ env.PLATFORMS }}
# driver-opts: |
# image=moby/buildkit:master
# network=host
# buildkitd-flags: "--debug --oci-worker-gc=false"
# - name: Build
# run: |
# DOCKER_BUILDKIT=1 docker buildx build --platform ${PLATFORMS} --progress plain --builder ${BUILDER} -f ./dockers/Dockerfile .
# env:
# BUILDER: ${{ steps.buildx.outputs.name }}
16 changes: 16 additions & 0 deletions dockers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder
# FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder

# ARG TARGETPLATFORM \
# TARGETARCH \
# BUILDPLATFORM \
# BUILDARCH

ARG BUILDPLATFORM \
TARGETPLATFORM \
TARGETARCH

RUN echo "TARGETPLATFORM=${TARGETPLATFORM} TARGETARCH=${TARGETARCH}" && \
echo "BUILDPLATFORM=${BUILDPLATFORM} BUILDARCH=${BUILDARCH}"

RUN uname -a