-
Notifications
You must be signed in to change notification settings - Fork 67
53 lines (44 loc) · 1.69 KB
/
ci-images.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
name: Registry
on:
workflow_run:
workflows: ["Scala"]
branches: [main]
types:
- completed
jobs:
build:
name: Build and push images
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: "Cache for sbt & coursier ♨️"
uses: coursier/[email protected]
with:
extraSbtFiles: 'tmp/remote-cache/**'
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v22
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v12
with:
name: feda
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- 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 jdk17-curl Docker image 🚀"
run: docker build -t jdk17-curl modules/
- name: "Build trading Docker images 🚀"
run: nix develop -c sbt 'pullRemoteCache;processor/docker:publishLocal;alerts/docker:publishLocal;ws/docker:publishLocal'
- name: "Push trading Docker images 🐳"
run: |
docker tag jdk17-curl ghcr.io/gvolpe/jdk17-curl:latest
docker tag trading-alerts ghcr.io/gvolpe/trading-alerts:latest
docker tag trading-processor ghcr.io/gvolpe/trading-processor:latest
docker tag trading-ws ghcr.io/gvolpe/trading-ws:latest
docker push ghcr.io/gvolpe/jdk17-curl:latest
docker push ghcr.io/gvolpe/trading-alerts:latest
docker push ghcr.io/gvolpe/trading-processor:latest
docker push ghcr.io/gvolpe/trading-ws:latest