-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (42 loc) · 1.46 KB
/
docker.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
name: Docker
# This workflow build and publish the docker image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# - name: Build and tag Docker image
# run: make docker_build
# - name: Docker image info
# run: docker images
- name: Login to container registries
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u skerkour --password-stdin
# - name: Push Docker images
# # see here for the details of the release phase https://devcenter.heroku.com/articles/container-registry-and-runtime#release-phase
# run: make docker_push
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
# We need to change the context, as by default we can't access the .git directory
# https://github.com/docker/build-push-action#git-context
# https://docs.docker.com/engine/reference/commandline/build/
context: "."
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/skerkour/go-benchmarks:latest
# benchmarks:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Run Benchmarks
# run: make run