From d89760702ae66316ceffae7064a68290097d369b Mon Sep 17 00:00:00 2001 From: JMARyA Date: Fri, 12 Apr 2024 08:28:04 +0200 Subject: [PATCH] actions --- .gitea/workflows/build.yml | 25 +++++++++++++++++++++++++ docker-compose.yml | 2 +- src/main.rs | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..c742404 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,25 @@ +name: build + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Docker + run: curl -fsSL https://get.docker.com | sh + + - name: Log in to Docker registry + run: echo "${{ secrets.registry_password }}" | docker login -u "jmarya" --password-stdin git.hydrar.de + + - name: Build and push Docker image + run: | + docker build -t git.hydrar.de/jmarya/mirrord:latest . + docker push git.hydrar.de/jmarya/mirrord:latest diff --git a/docker-compose.yml b/docker-compose.yml index fac0b18..62728b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,4 +6,4 @@ services: - 8080:8080 volumes: - ./data:/data - - ./sample.conf:/sample.conf + - ./sample.conf:/mirrord.conf diff --git a/src/main.rs b/src/main.rs index b2292cf..cf1f136 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,7 @@ async fn main() -> std::io::Result<()> { let proxym = { let config: config::Config = - toml::from_str(&std::fs::read_to_string("./sample.conf").unwrap()).unwrap(); + toml::from_str(&std::fs::read_to_string("./mirrord.conf").unwrap()).unwrap(); config.to_proxy() };