mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Merge branch 'main' into minor-changes
This commit is contained in:
commit
39a30d199f
3 changed files with 29 additions and 11 deletions
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
|
|
@ -6,13 +6,11 @@ on:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
|
||||||
permissions: write-all # Necessary for the generate-build-provenance action with containers
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -20,6 +18,12 @@ jobs:
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.21
|
go-version: 1.21
|
||||||
|
- name: Docker Login
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,28 @@ archives:
|
||||||
- CHANGELOG.md
|
- CHANGELOG.md
|
||||||
- README.md
|
- README.md
|
||||||
- bin/magellan.sh
|
- bin/magellan.sh
|
||||||
|
dockers:
|
||||||
|
-
|
||||||
|
image_templates:
|
||||||
|
- ghcr.io/openchami/{{.ProjectName}}:latest
|
||||||
|
- ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}
|
||||||
|
- ghcr.io/openchami/{{.ProjectName}}:v{{ .Major }}
|
||||||
|
- ghcr.io/openchami/{{.ProjectName}}:v{{ .Major }}.{{ .Minor }}
|
||||||
|
build_flag_templates:
|
||||||
|
- "--pull"
|
||||||
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
|
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||||
|
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||||
|
extra_files:
|
||||||
|
- LICENSE
|
||||||
|
- CHANGELOG.md
|
||||||
|
- README.md
|
||||||
|
- bin/magellan.sh
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ incpatch .Version }}-next"
|
version_template: "{{ incpatch .Version }}-next"
|
||||||
changelog:
|
changelog:
|
||||||
sort: asc
|
sort: asc
|
||||||
filters:
|
filters:
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,6 @@ SCAN_PARAMS=""
|
||||||
COLLECT_PARAMS=""
|
COLLECT_PARAMS=""
|
||||||
|
|
||||||
|
|
||||||
function build(){
|
|
||||||
go mod tidy && go build -C bin/magellan
|
|
||||||
}
|
|
||||||
|
|
||||||
function scan() {
|
function scan() {
|
||||||
# ./magellan scan --subnet 172.16.0.0 --port 443
|
# ./magellan scan --subnet 172.16.0.0 --port 443
|
||||||
${EXE} scan ${SCAN_PARAMS}
|
${EXE} scan ${SCAN_PARAMS}
|
||||||
|
|
@ -30,7 +26,7 @@ function scan() {
|
||||||
|
|
||||||
function list(){
|
function list(){
|
||||||
# ./magellan list
|
# ./magellan list
|
||||||
${EXE} list
|
${EXE} list
|
||||||
}
|
}
|
||||||
|
|
||||||
function collect() {
|
function collect() {
|
||||||
|
|
@ -48,7 +44,7 @@ function collect() {
|
||||||
|
|
||||||
# parse incoming arguments to set variables
|
# parse incoming arguments to set variables
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--scan)
|
--scan)
|
||||||
SCAN_PARAMS="$2"
|
SCAN_PARAMS="$2"
|
||||||
shift
|
shift
|
||||||
|
|
@ -107,7 +103,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
ARGS+=("$1") # save positional arg
|
ARGS+=("$1") # save positional arg
|
||||||
shift # past argument
|
shift # past argument
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue