Skip to content

Commit

Permalink
Finalize all CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MotorTruck1221 committed Mar 14, 2024
1 parent 8b94083 commit 811aa32
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 2 deletions.
72 changes: 70 additions & 2 deletions .github/workflows/dockerHub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ env:
IMAGE_NAME: motortruck1221/ruby

jobs:
build-and-push-image:
build-and-push-image-normal:
name: Build and Push Docker Image (Normal, MRI ruby)
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -29,12 +30,79 @@ jobs:
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/motortruck1221/ruby
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
target: normal
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-and-push-image-jruby:
name: Build and Push Docker Image (JRuby)
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Submodule Update
run: git submodule update --init --recursive
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Login To registry ${{ env.REGISTRY }}
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/motortruck1221/ruby-jruby
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
target: jruby
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-and-push-image-truffleruby:
name: Build and Push Docker Image (TruffleRuby)
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Submodule Update
run: git submodule update --init --recursive
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Login To registry ${{ env.REGISTRY }}
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/motortruck1221/ruby-truffleruby
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
target: truffleruby
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Test The Docker Build
on: [pull_request, workflow_dispatch]
jobs:
build:
name: Test Docker Build (Normal, MRI ruby)
runs-on: ubuntu-latest
if: github.repository_owner == 'Ruby-Network'
steps:
Expand All @@ -15,6 +16,45 @@ jobs:
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
target: normal
file: ./docker/Dockerfile
push: false
tags: ruby-network/ruby-network:testing
build-jruby:
name: Test Docker Build (JRuby)
runs-on: ubuntu-latest
if: github.repository_owner == 'Ruby-Network'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Submodule Update
run: git submodule update --init --recursive
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Build
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
target: jruby
file: ./docker/Dockerfile
push: false
tags: ruby-network/ruby-network:testing-jruby
build-truffleruby:
name: Test Docker Build (TruffleRuby)
runs-on: ubuntu-latest
if: github.repository_owner == 'Ruby-Network'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Submodule Update
run: git submodule update --init --recursive
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Build
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
target: truffleruby
file: ./docker/Dockerfile
push: false
tags: ruby-network/ruby-network:testing-truffleruby

0 comments on commit 811aa32

Please sign in to comment.