-
Notifications
You must be signed in to change notification settings - Fork 6
73 lines (64 loc) · 2.08 KB
/
docker-aeon-mecha.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
name: Aeon Mecha Container Environment
on:
push:
branches: [datajoint_pipeline]
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: v0.0.0a
- name: Assign environment variables
run: |
echo "repository_lower=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >>$GITHUB_ENV
echo "image_build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >>$GITHUB_ENV
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: linux/amd64,linux/arm64
- name: Setup Docker buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
driver: docker-container
driver-opts: |
image=moby/buildkit:buildx-stable-1
buildkitd-flags: --debug
config-inline: |
[worker.oci]
max-parallelism = 2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
no-cache: true
build-args: |
IMAGE_CREATED=${{ env.image_build_date }}
IMAGE_VERSION=${{ steps.previoustag.outputs.tag }}
context: .
file: docker/image/Dockerfile
# platforms: linux/arm64,linux/amd64
platforms: linux/amd64
push: true
tags: |
ghcr.io/${{ env.repository_lower }}:latest
ghcr.io/${{ env.repository_lower }}:${{ steps.previoustag.outputs.tag }}
- name: Image digest
run: |
echo ${{ steps.docker_build.outputs.digest }}
docker system df
docker images -a