Update docker-build-multiarch.yml
This commit is contained in:
@@ -11,7 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -20,11 +20,16 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
run: |
|
||||
docker buildx create --name multi --use
|
||||
docker buildx inspect --bootstrap
|
||||
- name: Set up QEMU (for cross-compiling)
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- 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
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -32,13 +37,32 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform ${{ env.PLATFORMS }} \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} \
|
||||
--push --progress=plain .
|
||||
# Optional: derive tags/labels from repo metadata
|
||||
# Comment out if you prefer static tags only
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
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
|
||||
run: |
|
||||
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 \
|
||||
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_OpenEXR=ON \
|
||||
# -DBUILD_EXAMPLES=OFF -DBUILD_TOOLS=OFF \
|
||||
-DBUILD_EXAMPLES=OFF -DBUILD_TOOLS=OFF \
|
||||
.. && \
|
||||
make -j2 && \
|
||||
make install && \
|
||||
|
||||
Reference in New Issue
Block a user