Skip to content

Commit 39b67f5

Browse files
committed
docker publish gh action
1 parent 0646f03 commit 39b67f5

3 files changed

Lines changed: 52 additions & 3 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release Binaries
22

33
on:
44
push:
@@ -35,3 +35,4 @@ jobs:
3535
with:
3636
files: |
3737
seedmirror-client-${{ github.ref_name }}-x86_64-linux-musl
38+
seedmirror-server-${{ github.ref_name }}-x86_64-linux-musl
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Docker Images
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: voidiz/seedmirror-client
11+
12+
jobs:
13+
build-and-push-client-image:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
attestations: write
19+
id-token: write
20+
21+
steps:
22+
- name: Checkout commit
23+
uses: actions/checkout@v5
24+
25+
- name: Log in to the Container registry
26+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
27+
with:
28+
registry: ${{ env.REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Extract metadata (tags, labels) for Docker
33+
id: meta
34+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
38+
- name: Build and push client Docker image
39+
id: push
40+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
41+
with:
42+
context: .
43+
file: docker/seedmirror-client/Dockerfile
44+
push: true
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}
47+
cache-from: type=registry,ref=voidiz/seedmirror-client:latest
48+
cache-to: type=inline

docker/seedmirror-client/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ FROM rust:${RUST_VERSION}-slim-trixie AS build
77
ARG APP_NAME
88
WORKDIR /app
99

10-
RUN --mount=type=bind,source=.,target=. \
11-
--mount=type=cache,target=/app/target/ \
10+
COPY . .
11+
RUN --mount=type=cache,target=/app/target/ \
1212
--mount=type=cache,target=/usr/local/cargo/registry/ \
1313
<<EOF
1414
set -e

0 commit comments

Comments
 (0)