Skip to content

Commit

Permalink
Attempt publishing arm docker base image
Browse files Browse the repository at this point in the history
  • Loading branch information
ekilmer committed Jan 4, 2024
1 parent db89911 commit 62bab24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/vcpkg_docker_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,22 @@ jobs:
strategy:
fail-fast: false
matrix:
# arch is to tag docker images for uniqueness
host:
- { name: 'ubuntu-22.04', arch: '' }
container:
- { version: '22.04', codename: 'jammy' }
platform:
- 'linux/amd64'
- 'linux/arm64/v8' # Apple Silicon Linux support

runs-on: ${{ matrix.host.name }}
runs-on: ubuntu-22.04

permissions:
packages: write
contents: read

steps:
- name: Cleanup working directory with container root
run: |
docker run --rm -v $(pwd):/workspace -w /workspace ubuntu:latest find . -name . -o -prune -exec rm -rf -- {} + || true
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Generate Image Name
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Expand All @@ -53,16 +52,17 @@ jobs:
if [[ "${GITHUB_REF}" != "refs/heads/master" ]] ; then
test_name="test-${BRANCH_NAME////_}-"
fi
echo "IMAGE_NAME=ghcr.io/lifting-bits/cxx-common/${test_name}vcpkg-builder-ubuntu-${{ env.IMAGE_VER }}:${{ matrix.container.version }}${{ matrix.host.arch }}" >> ${GITHUB_ENV}
echo "IMAGE_NAME=ghcr.io/lifting-bits/cxx-common/${test_name}vcpkg-builder-ubuntu-${{ env.IMAGE_VER }}:${{ matrix.container.version }}" >> ${GITHUB_ENV}
- name: Build image
working-directory: docker
run: |
# Pull freshest ubuntu Docker image
docker pull ubuntu:${{ matrix.container.version}}
docker pull --platform "${{ matrix.platform }}" ubuntu:${{ matrix.container.version}}
docker build -f Dockerfile.ubuntu.vcpkg \
--no-cache \
--platform "${{ matrix.platform }}" \
--target caching \
--build-arg "DISTRO_VERSION=${{ matrix.container.codename }}" \
-t "${IMAGE_NAME}" \
Expand Down
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -euo pipefail
IMAGE_VER=v2

# Ubuntu versions to build
UBUNTU_VERSION_MATRIX=( "focal" "jammy" )
UBUNTU_VERSION_MATRIX=( "jammy" )

for version in "${UBUNTU_VERSION_MATRIX[@]}"; do
# Always pull from upstream
Expand Down

0 comments on commit 62bab24

Please sign in to comment.