Add arm64 building potentially.

This commit is contained in:
Kokomo123
2024-08-22 16:57:16 -04:00
parent 4e16e59391
commit 60f6061ba8

View File

@@ -55,20 +55,26 @@ jobs:
echo "IMAGE_ID=$(echo ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV echo "IMAGE_ID=$(echo ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
# region See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio # region See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
- name: Build Image - name: Use QEMU
run: | uses: docker/setup-qemu-action@master
docker build -t $IMAGE_NAME . with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Log In to Registry - name: Log In to Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin run: echo "${{ secrets.TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push Image - name: Build and push the docker image
run: | uses: docker/build-push-action@master
echo IMAGE_ID=$IMAGE_ID with:
echo IMAGE_VERSION=$IMAGE_VERSION context: .
docker tag $IMAGE_NAME $IMAGE_ID:$IMAGE_VERSION builder: ${{ steps.buildx.outputs.name }}
# Always tag latest when pushing a tag, as we don't expect to ever merge old tags platforms: linux/arm64,linux/amd64
[[ "${{ github.ref }}" == "refs/tags/"* ]] && docker tag $IMAGE_NAME $IMAGE_ID:latest push: true
docker push $IMAGE_ID:$IMAGE_VERSION tags: ghcr.io/kokomo/5etools-img:latest
docker push $IMAGE_ID:latest #labels: ${{ steps.meta.outputs.labels }}
# endregion # endregion