Update docker-build-multiarch.yml
This commit is contained in:
@@ -11,7 +11,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
@@ -20,11 +20,16 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up QEMU (for cross-compiling)
|
||||||
run: |
|
uses: docker/setup-qemu-action@v3
|
||||||
docker buildx create --name multi --use
|
|
||||||
docker buildx inspect --bootstrap
|
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
cleanup: true
|
||||||
|
|
||||||
|
# Login to your Gitea registry
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -32,13 +37,32 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build Docker image
|
# Optional: derive tags/labels from repo metadata
|
||||||
run: |
|
# Comment out if you prefer static tags only
|
||||||
docker buildx build \
|
- name: Docker metadata
|
||||||
--platform ${{ env.PLATFORMS }} \
|
id: meta
|
||||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} \
|
uses: docker/metadata-action@v5
|
||||||
--push --progress=plain .
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ env.TAG_NAME }}
|
||||||
|
type=raw,value=sha-${{ github.sha }}
|
||||||
|
flavor: |
|
||||||
|
latest=false
|
||||||
|
|
||||||
|
- name: Build and push (multi-arch)
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
# Optional: print the final manifest list for verification
|
||||||
- name: Inspect pushed manifest
|
- name: Inspect pushed manifest
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }}
|
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ RUN git clone https://github.com/stevenlovegrove/Pangolin.git && \
|
|||||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 \
|
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 \
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_OpenEXR=ON \
|
-DCMAKE_DISABLE_FIND_PACKAGE_OpenEXR=ON \
|
||||||
# -DBUILD_EXAMPLES=OFF -DBUILD_TOOLS=OFF \
|
-DBUILD_EXAMPLES=OFF -DBUILD_TOOLS=OFF \
|
||||||
.. && \
|
.. && \
|
||||||
make -j2 && \
|
make -j2 && \
|
||||||
make install && \
|
make install && \
|
||||||
|
|||||||
Reference in New Issue
Block a user