-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (34 loc) · 1.04 KB
/
build-docker.yaml
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
name: Docker image CI
on:
push:
workflow_dispatch:
inputs:
tag:
description: 'Tag to give the build. Try to make it unique.'
required: true
env:
CHANNEL: ${{ inputs.tag || github.head_ref || github.ref_name }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
TAG_BASE: rainprotocol/arb-bot
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Prepare Sushi Lib
run: ./prep-sushi.sh
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
docker build -t "$TAG_BASE:$CHANNEL" --build-arg GIT_SHA=${{ github.sha }} --build-arg DOCKER_CHANNEL=$CHANNEL .
- run: |
docker push "$TAG_BASE:$CHANNEL"