This commit is contained in:
parent
0f35d34bcb
commit
49103085f7
3 changed files with 16 additions and 35 deletions
|
@ -1,35 +0,0 @@
|
||||||
name: deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: host
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.hydrar.de
|
|
||||||
username: ${{ secrets.registry_user }}
|
|
||||||
password: ${{ secrets.registry_password }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: git.hydrar.de/jmarya/mirrord:latest
|
|
15
.woodpecker/build.yml
Normal file
15
.woodpecker/build.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
platforms: linux/amd64
|
||||||
|
repo: git.hydrar.de/jmarya/mirrord
|
||||||
|
registry: git.hydrar.de
|
||||||
|
tag: latest
|
||||||
|
username: jmarya
|
||||||
|
password:
|
||||||
|
from_secret: registry_token
|
|
@ -7,6 +7,7 @@ async fn index(req: HttpRequest) -> impl Responder {
|
||||||
let path = req.path();
|
let path = req.path();
|
||||||
let p: &actix_web::web::Data<Mirror> = req.app_data().unwrap();
|
let p: &actix_web::web::Data<Mirror> = req.app_data().unwrap();
|
||||||
|
|
||||||
|
// todo : test
|
||||||
if path == "/" {
|
if path == "/" {
|
||||||
if let Some(ret) = p.index_page() {
|
if let Some(ret) = p.index_page() {
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue