-
-
Notifications
You must be signed in to change notification settings - Fork 24
101 lines (89 loc) · 2.77 KB
/
maintenance-linux.yml
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
name: Build Linux
on:
push:
pull_request:
workflow_dispatch:
inputs:
crystal_version:
required: true
default: "master"
type: string
previous_crystal_version:
required: true
default: "1.10.1"
type: string
env:
CRYSTAL_VERSION: "${{ inputs.crystal_version || 'master' }}"
CRYSTAL_SHA1: "${{ inputs.crystal_version || 'master' }}"
PREVIOUS_CRYSTAL_VERSION: "${{ inputs.previous_crystal_version || '1.10.1' }}"
jobs:
build-linux:
name: Build x86 Linux tarballs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build linux binaries
working-directory: linux
run: make all #pull_images=true release=true
- name: Upload tarballs for use in the next step
uses: actions/upload-artifact@v3
with:
name: linux-${{ env.CRYSTAL_VERSION }}
path: linux/build/*.gz
package-docker:
name: Build the docker images
runs-on: ubuntu-latest
needs: build-linux
env:
tag: "crystallang/crystal:${{ env.CRYSTAL_VERSION }}"
steps:
- name: Download the linux tarballs
uses: actions/download-artifact@v3
with:
name: linux-${{ inputs.CRYSTAL_VERSION }}
path: linux/build/
- run: ls linux/build/
- name: Build ubuntu runtime image
uses: docker/build-push-action@v5
with:
target: runtime
file: docker/ubuntu.Dockerfile
build-contexts: tarball=linux/build/
push: false
load: true
tags: "${{ env.tag }}"
- name: Build ubuntu build image
uses: docker/build-push-action@v5
with:
target: build
file: docker/ubuntu.Dockerfile
build-contexts: tarball=linux/build/
push: false
load: true
tags: "${{ env.tag }}-build"
- name: Build alpine runtime image
uses: docker/build-push-action@v5
with:
target: runtime
file: docker/alpine.Dockerfile
build-contexts: tarball=linux/build/
push: false
load: true
tags: "${{ env.tag }}-alpine"
- name: Build alpine build image
uses: docker/build-push-action@v5
with:
target: build
file: docker/alpine.Dockerfile
build-contexts: tarball=linux/build/
push: false
load: true
tags: "${{ env.tag }}-alpine-build"
- name: Inspect ubuntu
run: docker image inspect "${{ env.tag }}"
- name: Inspect ubuntu
run: docker image inspect "${{ env.tag }}-build"
- name: Inspect alpine
run: docker image inspect "${{ env.tag }}-alpine"
- name: Inspect alpine
run: docker image inspect "${{ env.tag }}-alpine-build"