-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (55 loc) · 2.27 KB
/
ci.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
name: CI
on: push
jobs:
test:
name: Run tests and build Docker image
runs-on: ubuntu-latest
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
ref: 'main'
submodules: recursive
- name: Setup
id: setup
run: |
{
echo "ENDB_GIT_DESCRIBE=$(git describe --always --dirty --tags)"
echo "RUST_OS=latest"
echo "SBCL_OS=debian"
echo "ENDB_OS=debian"
echo "DOCKER_TAG=endatabas/endb:ci"
} >> "$GITHUB_OUTPUT"
- name: Print Setup
id: print_setup
run: |
{
echo "### Workflow variables"
echo "| Variable | Value |"
echo "| ----------------- | -------------------------------------------- |"
echo "| ENDB_GIT_DESCRIBE | ${{ steps.setup.outputs.ENDB_GIT_DESCRIBE }} |"
echo "| RUST_OS | ${{ steps.setup.outputs.RUST_OS }} |"
echo "| SBCL_OS | ${{ steps.setup.outputs.SBCL_OS }} |"
echo "| ENDB_OS | ${{ steps.setup.outputs.ENDB_OS }} |"
echo "| DOCKER_TAG | ${{ steps.setup.outputs.DOCKER_TAG }} |"
} >> $GITHUB_STEP_SUMMARY
- name: Build Docker
uses: docker/build-push-action@v5
with:
pull: true # equivalent to --pull, not --pull-always / --pull=always
push: false
context: .
# https://docs.docker.com/build/ci/github-actions/multi-platform/
# https://dev.to/cloudx/multi-arch-docker-images-the-easy-way-with-github-actions-4k54
# platforms: linux/amd64
file: ./Dockerfile
build-args: |
ENDB_GIT_DESCRIBE=${{ steps.setup.outputs.ENDB_GIT_DESCRIBE }}
RUST_OS=${{ steps.setup.outputs.RUST_OS }}
SBCL_OS=${{ steps.setup.outputs.SBCL_OS }}
ENDB_OS=${{ steps.setup.outputs.ENDB_OS }}
tags: ${{ steps.setup.outputs.DOCKER_TAG }} # not required, but maintains
# symmetry with build-push-docker-release.yml