-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (45 loc) · 1.24 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: docker
on:
push:
branches: [main]
paths:
- .github/workflows/docker.yaml
- Cargo.toml
- bin/docker/**
- lib/**
permissions:
packages: write
contents: read
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
key: docker
- run: cargo build --release
working-directory: ./bin/docker
- run: cp target/release/synixe-docker ./bin/docker/synixe-docker
- name: Build Image
working-directory: ./bin/docker
run: docker build . -t docker
- name: Tag Image
run: docker tag docker ghcr.io/synixecontractors/apps-docker:latest
- name: Push Image
run: docker push ghcr.io/synixecontractors/apps-docker:latest