Skip to content

Commit

Permalink
Pass through version argument
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 19, 2023
1 parent 0210fe8 commit ff95b55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

- name: Get the image name
if: github.event_name != 'pull_request'
id: image_description
id: image_name
run: |
echo "image_name=$(docker buildx bake --print 2> /dev/null | jq -r '.target.release.labels."org.opencontainers.image.title"')" >> $GITHUB_ENV
Expand Down
8 changes: 5 additions & 3 deletions aws-cli/Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG CONTAINER_REGISTRY=docker.io
FROM $CONTAINER_REGISTRY/amazonlinux:2 as installer

ARG AWS_CLI_VERSION=2.13.28

COPY aws-cli.key /tmp/aws-cli/aws-cli.key

RUN yum update -y \
Expand All @@ -9,13 +11,13 @@ RUN yum update -y \
&& arch="$(arch)" \
&& case "${arch##*-}" in \
x86_64) \
AWS_CLI_URL='https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.13.28.zip' \
AWS_CLI_URL='https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERISON}.zip' \
;; \
aarch64) \
AWS_CLI_URL='https://awscli.amazonaws.com/awscli-exe-linux-aarch64-2.13.28.zip' \
AWS_CLI_URL='https://awscli.amazonaws.com/awscli-exe-linux-aarch64-${AWS_CLI_VERISON}.zip' \
;; \
armv7l) \
AWS_CLI_URL='https://awscli.amazonaws.com/awscli-exe-linux-armv7l-2.13.28.zip' \
AWS_CLI_URL='https://awscli.amazonaws.com/awscli-exe-linux-armv7l-${AWS_CLI_VERISON}.zip' \
;; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
Expand Down
3 changes: 3 additions & 0 deletions aws-cli/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ variable "LOCAL_PLATFORM" {
}

target "_common" {
args = {
AWS_CLI_VERSION = ${VERSION}
}
dockerfile = "Containerfile"
tags = [
"${CONTAINER_REGISTRY}/${IMAGE_NAME}:${VERSION}",
Expand Down

0 comments on commit ff95b55

Please sign in to comment.