Skip to content

Commit

Permalink
Workflows & README: Adding workflow for docker image and binary relea…
Browse files Browse the repository at this point in the history
…ses, Updating TODO Status
  • Loading branch information
justsaumit committed Dec 26, 2023
1 parent 0629901 commit 1be3ab5
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: goreleaser

on:
push:
tags:
- "v*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docker Image CI for GHCR

on:
push:
tags:
- "v*"

jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/go-fis-api:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/go-fis-api:latest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Once the server is running, you can access the API endpoints to upload a file fo
- [x] Containerize the API
- [x] Optimize Docker Image size (Previously 509MB, Optimized: 22.2MB)
- [x] Exclude [go-sqlite3](https://pkg.go.dev/github.com/mattn/go-sqlite3) as the SQLite3 driver in favor of a CGO-free port written in pure Go - [modernc-sqlite](https://pkg.go.dev/modernc.org/sqlite) (to avoid CGO cross-compilation errors)
- [ ] Create a Github workflow for binary releases and docker image packages
- [x] Create a Github workflow for binary releases and docker image packages

## License

Expand Down

0 comments on commit 1be3ab5

Please sign in to comment.