Skip to content

Commit

Permalink
initial push
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoisso committed Sep 25, 2023
1 parent 53a2711 commit 31d4815
Show file tree
Hide file tree
Showing 9 changed files with 1,666 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Dockerize

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint
run: cargo clippy --all -- -D warnings
- name: Format
run: cargo fmt --all -- --check
- name: Set up Docker Build
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/cloudflare-ddns:latest
24 changes: 24 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint, Format and Build

on:
pull_request:
branches:
- main

jobs:
lint-format-build-rust:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Lint
run: cargo clippy --all -- -D warnings
- name: Format
run: cargo fmt --all -- --check
- name: Build
run: cargo build
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# IntelliJ IDEA
.iml
.idea

# Environment
.env
Loading

0 comments on commit 31d4815

Please sign in to comment.