-
Notifications
You must be signed in to change notification settings - Fork 12
55 lines (47 loc) · 1.41 KB
/
service-all-push.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
54
55
name: Publish all services docker image
on:
push:
paths:
- "basic/**"
- "support/iam/**"
- "support/auth/**"
- "support/reach/**"
- "services/**"
- "spi/**"
- "middleware/**"
- "Cargo.toml"
- ".github/workflows/service-all-push.yml"
jobs:
push_to_registry:
name: Push docker image to registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Check out the repo
uses: actions/checkout@v3
- name: Init rust envrionment
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Build rust
run: cargo build --release -p bios-serv-all
- name: Copy binary to workspace
run: cp ./target/release/bios-serv-all ./services/bios-all/
- name: Build and push Docker image to dockerhub
uses: mr-smithers-excellent/docker-build-push@v5
with:
directory: services/bios-all
dockerfile: services/bios-all/Dockerfile
registry: docker.io
image: ecfront/bios-serv-all
tags: latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}