push to registry

This commit is contained in:
Tim Wundenberg
2023-06-23 20:03:59 +02:00
parent 492024d99a
commit 0fd70353bf
3 changed files with 9 additions and 25 deletions

View File

@@ -2,14 +2,14 @@ name: Docker Image CI
on:
push:
branches: [ "main" ]
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --tag cloudflare-dynamic-dns:$(date +%s)
run: docker build . --tag ghcr.io/azoth128/cloudflare-dynamic-dns:latest
run: docker push ghcr.io/azoth128/cloudflare-dynamic-dns:latest

View File

@@ -1,17 +0,0 @@
name: Rust
on:
push:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: rust:1.70
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --release

View File

@@ -1,8 +1,9 @@
FROM rust:1.70
FROM rust:1.70 as builder
WORKDIR ./src/
COPY . .
RUN cargo install --path .
FROM debian:bullseye-slim
RUN apt-get update && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/cloudflare-dynamic-dns /usr/local/bin/cloudflare-dynamic-dns
CMD ["cloudflare-dynamic-dns"]