Skip to content

Commit

Permalink
rename to awsserver
Browse files Browse the repository at this point in the history
  • Loading branch information
leneffets authored Jan 20, 2025
1 parent fbce794 commit 9865eb6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
run: go mod tidy

- name: Build
run: CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./output/ssmserver ./cmd/server
run: CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./output/awsserver ./cmd/server

- name: Run tests
run: go test -v ./...

- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ssmserver
path: ./output/ssmserver
name: awsserver
path: ./output/awsserver

build-and-push:
runs-on: ubuntu-latest
Expand All @@ -56,5 +56,5 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/ssmserver:latest,ghcr.io/${{ github.repository_owner }}/ssmserver:${{ github.ref_name }}
tags: ghcr.io/${{ github.repository_owner }}/awsserver:latest,ghcr.io/${{ github.repository_owner }}/awsserver:${{ github.ref_name }}

12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: go mod tidy

- name: Build Binary
run: CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./output/ssmserver ./cmd/server
run: CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./output/awsserver ./cmd/server

- name: Get build architecture
id: arch
Expand All @@ -32,8 +32,8 @@ jobs:
run: |
mkdir -p release
ARCH=${{ env.ARCH }}
TAR_NAME="ssmserver-linux-${ARCH}.tar.gz"
tar -czvf release/${TAR_NAME} -C ./output ssmserver
TAR_NAME="awsserver-linux-${ARCH}.tar.gz"
tar -czvf release/${TAR_NAME} -C ./output awsserver
echo "RELEASE_FILE=release/${TAR_NAME}" >> $GITHUB_ENV
- name: Create GitHub Release
Expand All @@ -50,10 +50,10 @@ jobs:
- Static binary for Linux architecture is available as a tar.gz archive.
- Docker image is available on GitHub Packages.
**Download Binary:** [ssmserver-${{ env.ARCH }}](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ssmserver-linux-${{ env.ARCH }}.tar.gz)
**Download Binary:** [awsserver-${{ env.ARCH }}](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/awsserver-linux-${{ env.ARCH }}.tar.gz)
**Docker Image:**
`docker pull ghcr.io/${{ github.repository_owner }}/ssmserver:${{ github.ref_name }}`
`docker pull ghcr.io/${{ github.repository_owner }}/awsserver:${{ github.ref_name }}`
Enjoy!
Expand All @@ -75,4 +75,4 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/ssmserver:${{ github.ref_name }}
tags: ghcr.io/${{ github.repository_owner }}/awsserver:${{ github.ref_name }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM golang AS builder
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./output/ssmserver ./cmd/server
RUN CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./output/awsserver ./cmd/server

FROM alpine
COPY --from=builder /app/output/ssmserver /usr/local/bin/ssmserver
COPY --from=builder /app/output/awsserver /usr/local/bin/awsserver
EXPOSE 3000
ENTRYPOINT ["/usr/local/bin/ssmserver"]
ENTRYPOINT ["/usr/local/bin/awsserver"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This project provides an HTTP server using Go, which interacts with AWS Services
Get the Container Image

```sh
docker pull ghcr.io/leneffets/ssmserver:v1.0.0
docker pull ghcr.io/leneffets/ssmserver:latest
docker pull ghcr.io/leneffets/awsserver:v1.0.0
docker pull ghcr.io/leneffets/awsserver:latest
```

## Setup
Expand Down
8 changes: 4 additions & 4 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/leneffets/ssmserver/pkg/ecr"
"github.com/leneffets/ssmserver/pkg/s3"
"github.com/leneffets/ssmserver/pkg/ssm"
"github.com/leneffets/ssmserver/pkg/sts"
"github.com/leneffets/awsserver/pkg/ecr"
"github.com/leneffets/awsserver/pkg/s3"
"github.com/leneffets/awsserver/pkg/ssm"
"github.com/leneffets/awsserver/pkg/sts"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/leneffets/ssmserver
module github.com/leneffets/awsserver

go 1.22.7

Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/aws/aws-sdk-go/service/ssm/ssmiface"
"github.com/aws/aws-sdk-go/service/sts"
"github.com/aws/aws-sdk-go/service/sts/stsiface"
ssmpkg "github.com/leneffets/ssmserver/pkg/ssm"
ssmpkg "github.com/leneffets/awsserver/pkg/ssm"
)

// MockSSMAPI for testing
Expand Down

0 comments on commit 9865eb6

Please sign in to comment.