Skip to content

Remove unused m gem. (#4088) #14

Remove unused m gem. (#4088)

Remove unused m gem. (#4088) #14

Workflow file for this run

name: Docker
on:
pull_request:
push:
branches:
- master
- oidc-api-tokens
permissions:
contents: read
id-token: write
jobs:
build:
name: Docker build (and optional push)
runs-on: ubuntu-22.04
env:
RUBYGEMS_VERSION: 3.4.19
RUBY_VERSION: 3.2.2
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # master
- name: Cache Docker layers
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-rubygems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-rubygems-org
- name: Install and start services (needed for image test)
run: docker-compose up -d
- name: Configure AWS credentials from Production account
uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v4.0.0
if: github.secret_source != 'None'
with:
role-to-assume: arn:aws:iam::048268392960:role/rubygems-ecr-pusher
aws-region: us-west-2
- name: Login to Amazon ECR
if: github.secret_source != 'None'
uses: aws-actions/amazon-ecr-login@2fc7aceee09e9e4a7105c0d060c656fad0b4f63d # v1.7.0
- name: build, test and optionally push docker image
run: ./script/build_docker.sh
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache