Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building arm64 #1

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,24 @@ 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_URL: ghcr.io
REPO: jackpocket/crops/poky
DEFAULT_DISTRO: debian-12
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
GHCR_USERNAME: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# a default, when another distro was desired.
ARG BASE_DISTRO=SPECIFY_ME

FROM crops/yocto:$BASE_DISTRO-base
FROM ghcr.io/jackpocket/crops/yocto:$BASE_DISTRO-base

USER root

Expand Down
5 changes: 4 additions & 1 deletion build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down