Test multi platform image
Signed-off-by: Christian Richter <crichter@suse.com>
This commit is contained in:
15
.github/workflows/docker-image.yml
vendored
15
.github/workflows/docker-image.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY: ghcr.io
|
DOCKER_REGISTRY: ghcr.io
|
||||||
DOCKER_IMAGE: dragonchaser/motsognir
|
DOCKER_IMAGE: dragonchaser/motsognir
|
||||||
DOCKER_TARGET_PLATFORM: linux/arm/v7
|
DOCKER_TARGET_PLATFORM: "linux/arm/v7,linux/arm64,linux/amd64"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -31,22 +31,13 @@ jobs:
|
|||||||
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
|
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
|
||||||
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
|
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
|
||||||
#echo ::set-output name=version::${GITHUB_RUN_NUMBER}
|
#echo ::set-output name=version::${GITHUB_RUN_NUMBER}
|
||||||
echo ::set-output name=version::latest-arm32v7
|
echo ::set-output name=version::latest
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Run Buildx (arm32v7)
|
- name: Run Buildx
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
cd motsognir
|
cd motsognir
|
||||||
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag ${{ steps.prepare.outputs.docker_image }}:${{steps.prepare.outputs.version }} --file ./Dockerfile.arm32v7 --output type=image,push=true .
|
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag ${{ steps.prepare.outputs.docker_image }}:${{steps.prepare.outputs.version }} --file ./Dockerfile.arm32v7 --output type=image,push=true .
|
||||||
|
|
||||||
- name: Build the Docker image (amd64)
|
|
||||||
run: |
|
|
||||||
cd motsognir
|
|
||||||
docker build . --file Dockerfile --tag ${{steps.prepare.outputs.docker_image}}:latest
|
|
||||||
- name: Push images
|
|
||||||
run: |
|
|
||||||
docker push ${{steps.prepare.outputs.docker_image}}:latest
|
|
||||||
#docker push ${{steps.prepare.outputs.docker_image}}:latest-arm32v7
|
|
||||||
|
|||||||
Reference in New Issue
Block a user