Skip to content

Commit 1074cd2

Browse files
canary versions
1 parent c223990 commit 1074cd2

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Docker Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
workflow_dispatch:
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: ${{ github.repository }}
12+
13+
jobs:
14+
build-and-push-image-normal:
15+
name: Build and Push Docker Image (Normal, MRI ruby)
16+
runs-on: ubuntu-latest
17+
if: github.repository_owner == 'Ruby-Network'
18+
permissions:
19+
contents: write
20+
packages: write
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@v3
24+
- name: Submodule Update
25+
run: git submodule update --init --recursive
26+
- name: Setup Docker Buildx
27+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
28+
- name: Login To registry ${{ env.REGISTRY }}
29+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
30+
with:
31+
registry: ${{ env.REGISTRY }}
32+
username: ${{ github.actor }}
33+
password: ${{ github.token }}
34+
- name: Extract Docker metadata
35+
id: meta
36+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
37+
with:
38+
images: ${{ env.REGISTRY }}/ruby-network/ruby-canary
39+
- name: Build and push Docker image
40+
id: build-and-push
41+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
42+
with:
43+
context: .
44+
file: ./docker/Dockerfile
45+
name: ruby
46+
target: normal
47+
push: ${{ github.event_name != 'pull_request' }}
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}
50+
cache-from: type=gha
51+
cache-to: type=gha,mode=max
52+
build-and-push-image-jruby:
53+
name: Build and Push Docker Image (JRuby)
54+
runs-on: ubuntu-latest
55+
if: github.repository_owner == 'Ruby-Network'
56+
permissions:
57+
contents: write
58+
packages: write
59+
steps:
60+
- name: Checkout Repo
61+
uses: actions/checkout@v3
62+
- name: Submodule Update
63+
run: git submodule update --init --recursive
64+
- name: Setup Docker Buildx
65+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
66+
- name: Login To registry ${{ env.REGISTRY }}
67+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
68+
with:
69+
registry: ${{ env.REGISTRY }}
70+
username: ${{ github.actor }}
71+
password: ${{ github.token }}
72+
- name: Extract Docker metadata
73+
id: meta
74+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
75+
with:
76+
images: ${{ env.REGISTRY }}/ruby-network/ruby-jruby-canary
77+
- name: Build and push Docker image
78+
id: build-and-push
79+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
80+
with:
81+
context: .
82+
file: ./docker/Dockerfile
83+
name: jruby
84+
target: jruby
85+
push: ${{ github.event_name != 'pull_request' }}
86+
tags: ${{ steps.meta.outputs.tags }}
87+
labels: ${{ steps.meta.outputs.labels }}
88+
cache-from: type=gha
89+
cache-to: type=gha,mode=max
90+
build-and-push-image-truffleruby:
91+
name: Build and Push Docker Image (TruffleRuby)
92+
runs-on: ubuntu-latest
93+
if: github.repository_owner == 'Ruby-Network'
94+
permissions:
95+
contents: write
96+
packages: write
97+
steps:
98+
- name: Checkout Repo
99+
uses: actions/checkout@v3
100+
- name: Submodule Update
101+
run: git submodule update --init --recursive
102+
- name: Setup Docker Buildx
103+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
104+
- name: Login To registry ${{ env.REGISTRY }}
105+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
106+
with:
107+
registry: ${{ env.REGISTRY }}
108+
username: ${{ github.actor }}
109+
password: ${{ github.token }}
110+
- name: Extract Docker metadata
111+
id: meta
112+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
113+
with:
114+
images: ${{ env.REGISTRY }}/ruby-network/ruby-truffleruby-canary
115+
- name: Build and push Docker image
116+
id: build-and-push
117+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
118+
with:
119+
context: .
120+
file: ./docker/Dockerfile
121+
name: truffleruby
122+
target: truffleruby
123+
push: ${{ github.event_name != 'pull_request' }}
124+
tags: ${{ steps.meta.outputs.tags }}
125+
labels: ${{ steps.meta.outputs.labels }}
126+
cache-from: type=gha
127+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)