-
Notifications
You must be signed in to change notification settings - Fork 112
31 lines (28 loc) · 1.03 KB
/
docker-image.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
name: Docker Image CI
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
docker-image: ['gerbil', 'gerbilxx']
steps:
- uses: actions/checkout@v3
- name: print out github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: List of all Github Actions env vars
run: env
- name: Build the Docker image
run: make -C docker ${{ matrix.docker-image }} REPO=${{ github.repository }} BRANCH=${{ github.head_ref || github.ref_name }}
- name: Push to Docker Hub on Pushes to master
run: |
docker login -u gerbil -p ${{ secrets.DOCKER_TOKEN }}
docker push gerbil/${{ matrix.docker-image }}:$(uname -m)-master
docker manifest create gerbil/${{ matrix.docker-image }}:master --amend gerbil/gerbil:aarch64-master --amend gerbil/gerbil:x86_64-master
docker manifest push gerbil/${{ matrix.docker-image }}:master
if: github.event_name == 'push'