Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 952c7b8660 | |||
| 9ba30d10b7 | |||
| 94b1681a38 | |||
| 574467e307 | |||
| dcb4c5cfc6 | |||
| 3e799c00d3 | |||
| 7bf6521002 | |||
| ab94f6207e | |||
| 412fcb497d | |||
| 0218ccd4cb | |||
| 34d5d40bd6 | |||
| 5f0f92ebda | |||
| 45230f4627 | |||
| bbf2a8d354 | |||
| c93003055c | |||
| c2aa4b82e5 | |||
| b93c7cdfd2 | |||
| 2caa61e3a3 | |||
| 7c7c359954 | |||
| 353b046344 | |||
| 4d1e262afd | |||
| 37a6573ce8 | |||
| fba129ec43 |
2
.github/workflows/image_creation.yaml
vendored
2
.github/workflows/image_creation.yaml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Build Push
|
name: Build Push Prod
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
47
.github/workflows/test_workflow.yml
vendored
Normal file
47
.github/workflows/test_workflow.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: dev workflow
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
- 'feature/**'
|
||||||
|
paths:
|
||||||
|
- '**.go'
|
||||||
|
- '**.yml'
|
||||||
|
- '**.yaml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
USERNAME: ${{ vars.USERNAME }}
|
||||||
|
TAG_VERSION: ${{ github.ref_name }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
|
- name: test with go
|
||||||
|
run: go test -v ./...
|
||||||
|
|
||||||
|
vulnCheck:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
USERNAME: ${{ vars.USERNAME }}
|
||||||
|
TAG_VERSION: ${{ github.ref_name }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: go vuln check
|
||||||
|
uses: golang/govulncheck-action@v1
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
go-package: ./...
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/.env
|
/.env
|
||||||
bin/*
|
bin/*
|
||||||
|
/.env2
|
||||||
|
|||||||
@ -13,4 +13,5 @@ RUN go build -o bin/ddns \
|
|||||||
|
|
||||||
FROM alpine AS runner
|
FROM alpine AS runner
|
||||||
COPY --from=builder /app/bin/ddns /usr/bin/
|
COPY --from=builder /app/bin/ddns /usr/bin/
|
||||||
|
|
||||||
ENTRYPOINT /usr/bin/ddns
|
ENTRYPOINT /usr/bin/ddns
|
||||||
|
|||||||
@ -227,6 +227,11 @@ func (app *Application) Operation(op string, name, tipo, ipSTR,rID, comment stri
|
|||||||
if name == "" {
|
if name == "" {
|
||||||
panic("name cant be empty for op create")
|
panic("name cant be empty for op create")
|
||||||
}
|
}
|
||||||
|
if dn == "" {
|
||||||
|
app.log.Debug("domains available", "domains", app.zoneRecords)
|
||||||
|
dn = name
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("domain name: %s", dn)
|
fmt.Printf("domain name: %s", dn)
|
||||||
rBody = app.GenerateReqBody(dn, tipo, app.publicIP.String(),comment, proxied)
|
rBody = app.GenerateReqBody(dn, tipo, app.publicIP.String(),comment, proxied)
|
||||||
app.Create(*rBody)
|
app.Create(*rBody)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user