Skip to content

Commit

Permalink
Build images and push to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Dec 28, 2021
1 parent 7359697 commit 16ae320
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 37 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build
on:
push:
branches:
- 'master'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOCKER_REGISTRY: ghcr.io
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the registry
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Watch Tower

- name: Watch Tower image tags & labels
id: meta-watch-tower
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY }}/atomex-protocol/watch-tower

- name: Watch Tower image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/watch_tower/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-watch-tower.outputs.tags }}
labels: ${{ steps.meta-watch-tower.outputs.labels }}

# Market Maker

- name: Market Maker image tags & labels
id: meta-market-maker
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY }}/atomex-protocol/market-maker

- name: Market Maker
uses: docker/build-push-action@v2
with:
context: .
file: build/market_maker/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-market-maker.outputs.tags }}
labels: ${{ steps.meta-market-maker.outputs.labels }}
37 changes: 0 additions & 37 deletions stack.yml

This file was deleted.

0 comments on commit 16ae320

Please sign in to comment.