From aaec36067ca6998992e5e994aaa3360fece887cd Mon Sep 17 00:00:00 2001 From: Matt Pichette Date: Mon, 9 Dec 2024 12:24:28 -0400 Subject: [PATCH 1/4] Building arm64 --- .github/workflows/build-test-deploy.yml | 24 ++++++++---------------- Dockerfile | 2 +- build-and-test.sh | 5 ++++- deploy.sh | 12 ++++++------ 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 3fc0ecd..0a143e9 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -14,31 +14,23 @@ on: jobs: build-test-deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-2core-arm64 permissions: packages: write strategy: fail-fast: false matrix: base_distro: [ - alma-8, - alma-9, - debian-10, - debian-11, - debian-12, - fedora-39, - fedora-40, - opensuse-15.4, - opensuse-15.5, - opensuse-15.6, - ubuntu-18.04, - ubuntu-20.04, - ubuntu-22.04 + debian-12, ] + targetplatform: [ + linux/arm64 + ] env: BASE_DISTRO: ${{ matrix.base_distro }} - REPO: crops/poky - DEFAULT_DISTRO: ubuntu-18.04 + TARGETPLATFORM: ${{ matrix.targetplatform }} + REPO: jackpocket/crops/poky + DEFAULT_DISTRO: debian-12 DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} GHCR_USERNAME: ${{ github.actor }} diff --git a/Dockerfile b/Dockerfile index cb554d2..8fd5347 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ # a default, when another distro was desired. ARG BASE_DISTRO=SPECIFY_ME -FROM crops/yocto:$BASE_DISTRO-base +FROM jackpocket/crops/yocto:$BASE_DISTRO-base USER root diff --git a/build-and-test.sh b/build-and-test.sh index 68ff2a4..32b5880 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -21,7 +21,10 @@ if [ "${ENGINE_CMD}" = "" ]; then ENGINE_CMD="docker" fi -${ENGINE_CMD} build --build-arg BASE_DISTRO=${BASE_DISTRO} --pull -t ${REPO}:${BASE_DISTRO} . +${ENGINE_CMD} build + --build-arg BASE_DISTRO=${BASE_DISTRO} \ + --build-arg TARGETPLATFORM=$(TARGETPLATFORM) \ + --pull -t ${REPO}:${BASE_DISTRO} . if command -v annotate-output; then ANNOTATE_OUTPUT=annotate-output diff --git a/deploy.sh b/deploy.sh index 558383f..a8b0fd0 100644 --- a/deploy.sh +++ b/deploy.sh @@ -16,13 +16,13 @@ fi # Don't deploy on pull requests because it could just be junk code that won't # get merged if ([ "${GITHUB_EVENT_NAME}" = "push" ] || [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ] || [ "${GITHUB_EVENT_NAME}" = "schedule" ]) && [ "${GITHUB_REF}" = "refs/heads/master" ]; then - echo $DOCKER_PASSWORD | ${ENGINE_CMD} login -u $DOCKER_USERNAME --password-stdin - ${ENGINE_CMD} push ${REPO}:${BASE_DISTRO} + #echo $DOCKER_PASSWORD | ${ENGINE_CMD} login -u $DOCKER_USERNAME --password-stdin + #${ENGINE_CMD} push ${REPO}:${BASE_DISTRO} - if [ "${DEFAULT_DISTRO}" = "${BASE_DISTRO}" ]; then - ${ENGINE_CMD} tag ${REPO}:${BASE_DISTRO} ${REPO}:latest - ${ENGINE_CMD} push ${REPO}:latest - fi + #if [ "${DEFAULT_DISTRO}" = "${BASE_DISTRO}" ]; then + # ${ENGINE_CMD} tag ${REPO}:${BASE_DISTRO} ${REPO}:latest + # ${ENGINE_CMD} push ${REPO}:latest + #fi ${ENGINE_CMD} tag ${REPO}:${BASE_DISTRO} ghcr.io/${REPO}:${BASE_DISTRO} From 4b7061ea7925078edef83df3d6616342c5495c68 Mon Sep 17 00:00:00 2001 From: Matt Pichette Date: Mon, 9 Dec 2024 12:34:00 -0400 Subject: [PATCH 2/4] Building arm64 --- build-and-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-and-test.sh b/build-and-test.sh index 32b5880..42d42a0 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -21,7 +21,7 @@ if [ "${ENGINE_CMD}" = "" ]; then ENGINE_CMD="docker" fi -${ENGINE_CMD} build +${ENGINE_CMD} build \ --build-arg BASE_DISTRO=${BASE_DISTRO} \ --build-arg TARGETPLATFORM=$(TARGETPLATFORM) \ --pull -t ${REPO}:${BASE_DISTRO} . From a1a78b0b04167c4aa4998b39823ef0e4f98ae17f Mon Sep 17 00:00:00 2001 From: Matt Pichette Date: Mon, 9 Dec 2024 12:39:44 -0400 Subject: [PATCH 3/4] Building arm64 --- .github/workflows/build-test-deploy.yml | 3 ++- build-and-test.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 0a143e9..e2cd644 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -28,7 +28,8 @@ jobs: ] env: BASE_DISTRO: ${{ matrix.base_distro }} - TARGETPLATFORM: ${{ matrix.targetplatform }} + TARGETPLATFORM: ${{ matrix.targetplatform }} + REPO_URL: ghcr.io REPO: jackpocket/crops/poky DEFAULT_DISTRO: debian-12 DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} diff --git a/build-and-test.sh b/build-and-test.sh index 42d42a0..91879a8 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -24,7 +24,7 @@ fi ${ENGINE_CMD} build \ --build-arg BASE_DISTRO=${BASE_DISTRO} \ --build-arg TARGETPLATFORM=$(TARGETPLATFORM) \ - --pull -t ${REPO}:${BASE_DISTRO} . + --pull -t $(REPO_URL)/${REPO}:${BASE_DISTRO} . if command -v annotate-output; then ANNOTATE_OUTPUT=annotate-output From fa3d1e2ff7e727533609aadf69ddc7c93812cfa6 Mon Sep 17 00:00:00 2001 From: Matt Pichette Date: Mon, 9 Dec 2024 12:58:36 -0400 Subject: [PATCH 4/4] Building arm64 --- Dockerfile | 2 +- build-and-test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fd5347..f87ba12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ # a default, when another distro was desired. ARG BASE_DISTRO=SPECIFY_ME -FROM jackpocket/crops/yocto:$BASE_DISTRO-base +FROM ghcr.io/jackpocket/crops/yocto:$BASE_DISTRO-base USER root diff --git a/build-and-test.sh b/build-and-test.sh index 91879a8..42d42a0 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -24,7 +24,7 @@ fi ${ENGINE_CMD} build \ --build-arg BASE_DISTRO=${BASE_DISTRO} \ --build-arg TARGETPLATFORM=$(TARGETPLATFORM) \ - --pull -t $(REPO_URL)/${REPO}:${BASE_DISTRO} . + --pull -t ${REPO}:${BASE_DISTRO} . if command -v annotate-output; then ANNOTATE_OUTPUT=annotate-output