working on image build #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build Docker Images" | |
on: | |
push: | |
branches: | |
- 'main' | |
env: | |
REGISTRY: ghcr.io | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
jobs: | |
build-ruby-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# - name: Install sls | |
# run: | | |
# npm install -g serverless | |
# pushd serverless-ruby-layer | |
# npm install | |
# popd | |
# pushd awslambda | |
# npm install | |
# shell: bash | |
# - name: Package (and buid) | |
# run: | | |
# pushd awslambda | |
# SLS_DEBUG=true sls package | |
# shell: bash | |
- name: Build new docker image | |
run: | | |
cd awslambda | |
mkdir .ruby_layer | |
cd .ruby_layer | |
cp ../Dockerfile . | |
cp ../Gemfile* . | |
cp -r ../derivative_rodeo . | |
docker build -t ghcr.io/scientist-softserv/space_stone/awsrubylayer:latest . | |
- name: Push new docker image | |
run: | | |
docker push ghcr.io/scientist-softserv/space_stone/awsrubylayer:latest | |
shell: bash |