Skip to content

Commit

Permalink
Merge branch 'main' into minor-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidallendj authored Aug 22, 2024
2 parents 0454735 + 76b6f37 commit 39a30d1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ on:
tags:
- v*

permissions: write-all # Necessary for the generate-build-provenance action with containers
permissions: write-all

jobs:

build:


runs-on: ubuntu-latest

steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
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
uses: actions/checkout@v4
with:
Expand Down
20 changes: 19 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,28 @@ archives:
- CHANGELOG.md
- README.md
- 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:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
10 changes: 3 additions & 7 deletions bin/magellan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ SCAN_PARAMS=""
COLLECT_PARAMS=""


function build(){
go mod tidy && go build -C bin/magellan
}

function scan() {
# ./magellan scan --subnet 172.16.0.0 --port 443
${EXE} scan ${SCAN_PARAMS}
Expand All @@ -30,7 +26,7 @@ function scan() {

function list(){
# ./magellan list
${EXE} list
${EXE} list
}

function collect() {
Expand All @@ -48,7 +44,7 @@ function collect() {

# parse incoming arguments to set variables
while [[ $# -gt 0 ]]; do
case $1 in
case $1 in
--scan)
SCAN_PARAMS="$2"
shift
Expand Down Expand Up @@ -107,7 +103,7 @@ while [[ $# -gt 0 ]]; do
ARGS+=("$1") # save positional arg
shift # past argument
;;
esac
esac
done

set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
Expand Down

0 comments on commit 39a30d1

Please sign in to comment.