From 039febe886880a17c8fcf8cb8ece63df602f18db Mon Sep 17 00:00:00 2001 From: Ross Ceballo Date: Mon, 13 Jan 2025 16:49:30 -0500 Subject: [PATCH] Update image to work with aarch64 --- .github/workflows/build.yaml | 30 ++++++++++++++++++++++++++++++ Dockerfile | 4 ++-- Makefile | 4 ---- 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build.yaml delete mode 100644 Makefile diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..ee03b01 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,30 @@ +name: Build + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: get tag + id: tag + shell: bash + run: | + if [ "$GITHUB_HEAD_REF" == "main" ]; then + echo tag="$(grep AWSCLI_VER Dockerfile | head -n 1 | cut -d'=' -f 2)" >> "${GITHUB_OUTPUT}" + fi + - name: Build and push + uses: lsst-dm/build-and-push@main + id: build + with: + push: true + github_token: ${{ secrets.GITHUB_TOKEN }} + platforms: linux/amd64,linux/arm64 + image: ${{ github.repository }} + tag: ${{ steps.tag.outputs.tag}} + diff --git a/Dockerfile b/Dockerfile index 673a745..14390de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM alpine:3 ARG AWS_DEFAULT_REGION=us-east-1 # This default version is always overridden in the Jenkins context by a value # from configuration in jenkins-dm-jobs -ARG AWSCLI_VER=1.25.21 +ARG AWSCLI_VER=1.36.39 RUN apk add --no-cache --upgrade python3 py3-pip bash && \ - pip3 install awscli==${AWSCLI_VER} --upgrade --no-cache-dir && \ + pip3 install awscli==${AWSCLI_VER} --upgrade --no-cache-dir --break-system-packages && \ rm -rf /root/.cache diff --git a/Makefile b/Makefile deleted file mode 100644 index ef593a1..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: build - -build: - docker build -t docker.io/lsstsqre/awscli:latest .