Skip to content

Add selenium/standalone-chrome 4.27.0 to ECR cache #66

Add selenium/standalone-chrome 4.27.0 to ECR cache

Add selenium/standalone-chrome 4.27.0 to ECR cache #66

name: build-rails-buildpack
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- ruby: '3.2.4'
folder: '3.1.x' # bookworm for linux/amd64
tag: '3.2.4@sha256:cf386d39f6a0fd0431a02bd1bb4acfa90673f763137ecb829875f9a3d9c26c5a'
- ruby: '3.3.0'
folder: '3.1.x' # bookworm
tag: '3.3.0-bookworm@sha256:8eb6fb9ea8d522506913b420fbaecace30c15f545fb86a8cf7406179e7efa3fd'
- ruby: '3.3.1'
folder: '3.1.x' # bookworm for linux/amd64
tag: '3.3.1-bookworm@sha256:797d68561a91415e05fd95178f467d86d77bce2d4f17f32683241a687cbd1705'
- ruby: '3.4.0'
folder: '3.1.x' # bookworm for linux/amd64
tag: '3.4.0-preview1-bookworm@sha256:d0bbfb3975620c7810a7dd0da0a16dde84202fc398cface181e5a8f2c2e702bc'
container:
image: docker:git
env:
DOCKER_REPOSITORY: public.ecr.aws/degica/rails-buildpack
DOCKER_BUILDKIT: '1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
runs-on: ubuntu-latest
steps:
- name: prepare
run: |-
apk add --no-cache python3 py3-pip
pip3 install --break-system-packages --upgrade pip
pip3 install --break-system-packages awscli
- name: workaround git security
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- name: setup
run: git submodule update --init
- name: build_and_push
run: |-
cd rails-buildpack/${{ matrix.folder }}
if [[ ${GITHUB_REF##*/} == 'master' ]]; then
IMAGE_TAG=${{ matrix.ruby }}
else
IMAGE_TAG=test-${GITHUB_REF##*/}-${{ matrix.ruby }} # branch name for dev usecases
fi
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/degica
docker build . -t $DOCKER_REPOSITORY:$IMAGE_TAG --build-arg RUBY_TAG=${{ matrix.tag }} --pull
docker images
docker push $DOCKER_REPOSITORY:$IMAGE_TAG
docker tag $DOCKER_REPOSITORY:$IMAGE_TAG $DOCKER_REPOSITORY:latest
docker push $DOCKER_REPOSITORY:latest
'on':
push:
branches:
- '*'