-
Notifications
You must be signed in to change notification settings - Fork 14
154 lines (147 loc) · 4.85 KB
/
build-images.yml
File metadata and controls
154 lines (147 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Build and Push Dev Images
on:
workflow_dispatch:
inputs:
image:
description: 'Image to build (leave empty for all)'
required: false
type: choice
options:
- ''
- base
- node
- go
- rust
- java
- dotnet
- ruby
- web
- full
version:
description: 'Version override (only used when single image selected)'
required: false
type: string
tag:
description: 'Tag override (only used when single image selected)'
required: false
type: string
env:
REGISTRY: docker.io
jobs:
build-matrix:
name: ${{ matrix.repo }}:${{ inputs.image == matrix.key && inputs.tag || matrix.tag }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Base image (Node + Python only)
- repo: dev-base
key: base
tag: "latest"
languages: "python,javascript"
# Node (Node + Python)
- repo: dev-node
key: node
tag: "22"
node_version: "22.0.0"
languages: "javascript,python"
# Go
- repo: dev-go
key: go
tag: "1.23"
go: "true"
go_version: "1.23.4"
languages: "go,golang"
# Rust
- repo: dev-rust
key: rust
tag: "1.83"
rust: "true"
rust_version: "1.83.0"
languages: "rust"
- repo: dev-rust
key: rust
tag: "1.85"
rust: "true"
rust_version: "1.85.0"
languages: "rust"
# Java
- repo: dev-java
key: java
tag: "21"
java: "true"
java_version: "21"
languages: "java"
# .NET
- repo: dev-dotnet
key: dotnet
tag: "8.0"
dotnet: "true"
dotnet_version: "8.0"
languages: "dotnet,csharp,fsharp,visualbasic"
# Ruby
- repo: dev-ruby
key: ruby
tag: "3.3"
ruby: "true"
ruby_version: "3.3"
languages: "ruby"
# Web (browsers + Node + Python)
- repo: dev-web
key: web
tag: "latest"
browsers: "true"
languages: "html,css,javascript"
# Full image with all languages
- repo: dev-full
key: full
tag: "latest"
go: "true"
go_version: "1.23.4"
rust: "true"
rust_version: "1.85.0"
java: "true"
java_version: "21"
dotnet: "true"
dotnet_version: "8.0"
ruby: "true"
ruby_version: "3.3"
languages: "go,golang,rust,java,dotnet,csharp,fsharp,visualbasic,ruby,python,javascript"
steps:
- uses: actions/checkout@v4
if: ${{ inputs.image == '' || inputs.image == matrix.key }}
- name: Set up Docker Buildx
if: ${{ inputs.image == '' || inputs.image == matrix.key }}
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: ${{ inputs.image == '' || inputs.image == matrix.key }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: ${{ inputs.image == '' || inputs.image == matrix.key }}
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: warpdotdev/${{ matrix.repo }}:${{ inputs.tag || matrix.tag }}
build-args: |
INSTALL_RUST=${{ matrix.rust || 'false' }}
INSTALL_GO=${{ matrix.go || 'false' }}
INSTALL_JAVA=${{ matrix.java || 'false' }}
INSTALL_DOTNET=${{ matrix.dotnet || 'false' }}
INSTALL_RUBY=${{ matrix.ruby || 'false' }}
INSTALL_BROWSERS=${{ matrix.browsers || 'false' }}
NODE_VERSION=${{ matrix.key == 'node' && inputs.version || matrix.node_version || '24.0.0' }}
GO_VERSION=${{ matrix.key == 'go' && inputs.version || matrix.go_version || '1.23.4' }}
RUST_VERSION=${{ matrix.key == 'rust' && inputs.version || matrix.rust_version || '1.85.0' }}
JAVA_VERSION=${{ matrix.key == 'java' && inputs.version || matrix.java_version || '21' }}
DOTNET_VERSION=${{ matrix.key == 'dotnet' && inputs.version || matrix.dotnet_version || '8.0' }}
RUBY_VERSION=${{ matrix.key == 'ruby' && inputs.version || matrix.ruby_version || '3.3' }}
LANGUAGES=${{ matrix.languages || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max