-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (147 loc) · 5.47 KB
/
docker-nightly.yaml
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
name: Docker Image CI
"on":
push:
branches:
- trunk
pull_request:
branches:
- trunk
schedule:
- cron: "0 0 * * *" # build nightly!
jobs:
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clone Artichoke
uses: actions/checkout@v2
with:
repository: artichoke/artichoke
path: artichoke
- name: Set Artichoke latest commit
id: latest
working-directory: artichoke
run: |
echo "Artichoke git ref: $(git rev-parse HEAD)"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Set Artichoke Rust toolchain version
id: rust_toolchain
working-directory: artichoke
run: |
echo "Rust toolchain version: $(cat rust-toolchain)"
echo "::set-output name=version::$(cat rust-toolchain)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: ubuntu/focal/Dockerfile
push: ${{ github.ref == 'refs/heads/trunk' }}
tags: |
artichokeruby/artichoke:latest
artichokeruby/artichoke:${{ steps.latest.outputs.commit }}
artichokeruby/artichoke:ubuntu-nightly
artichokeruby/artichoke:ubuntu-focal-nightly
artichokeruby/artichoke:ubuntu20.04-nightly
artichokeruby/artichoke:ubuntu-nightly-${{ steps.latest.outputs.commit }}
build-args: |
ARTICHOKE_NIGHTLY_VER=${{ steps.latest.outputs.commit }}
RUST_VERSION=${{ steps.rust_toolchain.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max,scope=docker-nightly-${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-v1
debian-slim:
name: Debian Slim
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clone Artichoke
uses: actions/checkout@v2
with:
repository: artichoke/artichoke
path: artichoke
- name: Set Artichoke latest commit
id: latest
working-directory: artichoke
run: |
echo "Artichoke git ref: $(git rev-parse HEAD)"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Set Artichoke Rust toolchain version
id: rust_toolchain
working-directory: artichoke
run: |
echo "Rust toolchain version: $(cat rust-toolchain)"
echo "::set-output name=version::$(cat rust-toolchain)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: debian/bullseye/slim/Dockerfile
push: ${{ github.ref == 'refs/heads/trunk' }}
tags: |
artichokeruby/artichoke:slim-nightly
artichokeruby/artichoke:slim-bullseye-nightly
artichokeruby/artichoke:slim-nightly-${{ steps.latest.outputs.commit }}
build-args: |
ARTICHOKE_NIGHTLY_VER=${{ steps.latest.outputs.commit }}
RUST_VERSION=${{ steps.rust_toolchain.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max,scope=docker-nightly-${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-v1
alpine:
name: Alpine
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clone Artichoke
uses: actions/checkout@v2
with:
repository: artichoke/artichoke
path: artichoke
- name: Set Artichoke latest commit
id: latest
working-directory: artichoke
run: |
echo "Artichoke git ref: $(git rev-parse HEAD)"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Set Artichoke Rust toolchain version
id: rust_toolchain
working-directory: artichoke
run: |
echo "Rust toolchain version: $(cat rust-toolchain)"
echo "::set-output name=version::$(cat rust-toolchain)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: alpine/Dockerfile
push: ${{ github.ref == 'refs/heads/trunk' }}
tags: |
artichokeruby/artichoke:alpine-nightly
artichokeruby/artichoke:alpine3-nightly
artichokeruby/artichoke:alpine-nightly-${{ steps.latest.outputs.commit }}
build-args: |
ARTICHOKE_NIGHTLY_VER=${{ steps.latest.outputs.commit }}
RUST_VERSION=${{ steps.rust_toolchain.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max,scope=docker-nightly-${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-v1