Skip to content

Commit 942857d

Browse files
authored
Merge pull request #1 from blinklabs-io/feat/initial-version
feat: initial version of haskell builder
2 parents 4831bda + 2790645 commit 942857d

File tree

7 files changed

+512
-202
lines changed

7 files changed

+512
-202
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Dockerfile
2+
README.md
3+
.github/

.github/workflows/ci-docker.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Docker CI
2+
3+
on:
4+
pull_request:
5+
branches: ['main']
6+
paths: ['Dockerfile','.github/workflows/ci-docker.yml']
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: blinklabs/haskell
11+
12+
jobs:
13+
build-amd64:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: qemu
18+
uses: docker/setup-qemu-action@v2
19+
- uses: docker/setup-buildx-action@v2
20+
- uses: actions/cache@v3
21+
with:
22+
path: /tmp/.buildx-cache
23+
key: ${{ runner.os }}-${{ runner.arch }}-buildx-${{ github.sha }}
24+
restore-keys: |
25+
${{ runner.os }}-${{ runner.arch }}-buildx-
26+
- id: meta
27+
uses: docker/metadata-action@v4
28+
with:
29+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
30+
flavor: |
31+
latest=false
32+
suffix=-amd64
33+
- name: build
34+
uses: docker/build-push-action@v3
35+
with:
36+
context: .
37+
push: false
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}
40+
cache-from: type=local,src=/tmp/.buildx-cache
41+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
42+
# TEMP fix
43+
# https://github.com/docker/build-push-action/issues/252
44+
# https://github.com/moby/buildkit/issues/1896
45+
- name: cache
46+
run: |
47+
rm -rf /tmp/.buildx-cache
48+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
49+
50+
build-arm64:
51+
runs-on: self-hosted
52+
steps:
53+
- uses: actions/checkout@v2
54+
- name: qemu
55+
uses: docker/setup-qemu-action@v2
56+
- uses: docker/setup-buildx-action@v2
57+
- uses: actions/cache@v3
58+
with:
59+
path: /tmp/.buildx-cache
60+
key: ${{ runner.os }}-${{ runner.arch }}-buildx-${{ github.sha }}
61+
restore-keys: |
62+
${{ runner.os }}-${{ runner.arch }}-buildx-
63+
- id: meta
64+
uses: docker/metadata-action@v4
65+
with:
66+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
67+
flavor: |
68+
latest=false
69+
suffix=-arm64v8
70+
- name: build
71+
uses: docker/build-push-action@v3
72+
with:
73+
context: .
74+
push: false
75+
tags: ${{ steps.meta.outputs.tags }}
76+
labels: ${{ steps.meta.outputs.labels }}
77+
cache-from: type=local,src=/tmp/.buildx-cache
78+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
79+
# TEMP fix
80+
# https://github.com/docker/build-push-action/issues/252
81+
# https://github.com/moby/buildkit/issues/1896
82+
- name: cache
83+
run: |
84+
rm -rf /tmp/.buildx-cache
85+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# The below is pulled from upstream and slightly modified
2+
# https://github.com/webiny/action-conventional-commits/blob/master/README.md#usage
3+
4+
name: Conventional Commits
5+
6+
on:
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Conventional Commits
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- uses: webiny/[email protected]

0 commit comments

Comments
 (0)