diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 932b3c6..36324ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,7 +43,9 @@ jobs: - name: Set image name as env var if: steps.check_tag.outputs.tag_exists == 'false' - run: echo "IMAGE_NAME=ghcr.io/${{ github.repository }}:${{ env.AWS_CLI_VERSION }}" >> $GITHUB_ENV + run: | + echo "IMAGE_NAME=ghcr.io/${{ github.repository }}:${{ env.AWS_CLI_VERSION }}" >> $GITHUB_ENV + echo "IMAGE_NAME_LATEST=ghcr.io/${{ github.repository }}:latest" >> $GITHUB_ENV - name: Set up QEMU if: steps.check_tag.outputs.tag_exists == 'false' @@ -68,7 +70,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ${{ env.IMAGE_NAME }} + images: | + ${{ env.IMAGE_NAME }} + ${{ env.IMAGE_NAME_LATEST }} - name: Build the image if: steps.check_tag.outputs.tag_exists == 'false' @@ -80,7 +84,9 @@ jobs: build-args: | AWS_CLI_VERSION=${{ env.AWS_CLI_VERSION }} ALPINE_VERSION=${{ env.ALPINE_VERSION }} - tags: ${{ env.IMAGE_NAME }} + tags: | + ${{ env.IMAGE_NAME }} + ${{ env.IMAGE_NAME_LATEST }} - name: Push tag if: steps.check_tag.outputs.tag_exists == 'false' @@ -96,6 +102,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} name: ${{ env.AWS_CLI_VERSION }} + tag: ${{ env.AWS_CLI_VERSION }} makeLatest: true skipIfReleaseExists: true body: | diff --git a/README.md b/README.md index 6e4a867..b70aa17 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ # AWS CLI v2 built on Alpine -This repository contains the Dockerfile for building an AWS CLI v2 image based on Alpine. -Unfortunately this process is very slow, so we we separated this into its own repository. Other Alpine-based images can now simply pull in this binaries like so: +[![Publish 🚀](https://github.com/spacelift-io/aws-cli-alpine/actions/workflows/publish.yml/badge.svg)](https://github.com/spacelift-io/aws-cli-alpine/actions/workflows/publish.yml) + +--- + +This repository contains the [Dockerfile](./Dockerfile) for building an [AWS CLI](https://github.com/aws/aws-cli) v2 image based on [Alpine](https://hub.docker.com/_/alpine). + +As of December 2022, this process is extremely slow (building on ARM architecture takes around an hour), that's why we separated this process into its own repository. + +Other Alpine-based images can now simply pull pre-built the binaries like so: ```dockerfile COPY --from=ghcr.io/spacelift-io/awscliv2:2.9.8 /usr/local/aws-cli/ /usr/local/aws-cli/ @@ -10,9 +17,9 @@ COPY --from=ghcr.io/spacelift-io/awscliv2:2.9.8 /aws-cli-bin/ /usr/local/bin/ The newest releases can be found in the [Releases](https://github.com/spacelift-io/aws-cli-alpine/releases) section. -## Schedule & builds +> **Note:** As of December 2022, AWS CLI v2 [builds with PyInstaller 5.3](https://github.com/aws/aws-cli/blob/2.9.8/requirements-build.txt#L4). This version is only compatible with Python 3.9, that's why we use an older Python image. -The release process is automated and the image is published to GitHub Container Registry. +## Schedule & builds 📅 -We check for the latest AWS CLI version in `tag_latest_version.yml` workflow periodically. -If a new version is found, we create a tag and `publish.yml` picks it up, builds it and published it to GitHub Container Registry. +We check for the latest AWS CLI version in `publish.yml` workflow periodically. +If a new version is found, we create a tag, then build and publish it to GitHub Container Registry.