From ef263cdcd2b8f96641671a11c6f31012dbd68951 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 10 Nov 2021 16:10:26 +0900 Subject: [PATCH] add docker-build --- .github/workflows/docker_build_push.yml | 34 +++++++++++++++++++++++++ src/libdoh/Cargo.toml | 8 +++--- 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/docker_build_push.yml diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml new file mode 100644 index 0000000..022f4fc --- /dev/null +++ b/.github/workflows/docker_build_push.yml @@ -0,0 +1,34 @@ +name: Build and Publish Docker + +on: + push: + branches: + - with_docker + +jobs: + build_and_push: + runs-on: ubuntu-latest + env: + IMAGE_NAME: doh-server + + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: ./docker + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest + file: ./docker/Dockerfile diff --git a/src/libdoh/Cargo.toml b/src/libdoh/Cargo.toml index aae4e6a..6056178 100644 --- a/src/libdoh/Cargo.toml +++ b/src/libdoh/Cargo.toml @@ -16,19 +16,19 @@ tls = ["tokio-rustls"] odoh-proxy = ["reqwest", "urlencoding"] [dependencies] -anyhow = "1.0.44" +anyhow = "1.0.45" arc-swap = "1.4.0" base64 = "0.13.0" byteorder = "1.4.3" bytes = "1.1.0" futures = "0.3.17" -hpke = "0.5.1" +hpke = "0.7.1" hyper = { version = "0.14.14", default-features = false, features = ["server", "http1", "http2", "stream"] } odoh-rs = "1.0.0-alpha.1" rand = "0.8.4" -reqwest = { version = "0.11.4", features = ["trust-dns"], optional = true} +reqwest = { version = "0.11.6", features = ["trust-dns"], optional = true} tokio = { version = "1.13.0", features = ["net", "rt-multi-thread", "parking_lot", "time", "sync"] } -tokio-rustls = { version = "0.23.0", features = ["early-data"], optional = true } +tokio-rustls = { version = "0.23.1", features = ["early-data"], optional = true } rustls-pemfile = "0.2.1" urlencoding = { version = "2.1.0", optional = true }