Skip to content

Commit

Permalink
feat: build and push container image to GHCR.
Browse files Browse the repository at this point in the history
Signed-off-by: mugioka <[email protected]>
  • Loading branch information
mugioka committed Mar 30, 2024
1 parent b76d386 commit 5f69ba5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Build
name: CI
on:
push:
branches:
- '**'
pull_request:
types: [opened, reopened]

jobs:
sonarcloud:
name: SonarCloud
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.22.1

- name: Test
run: go test --tags=test -coverprofile=cover.out $(go list ./... | grep -v mxtransporter/cmd)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
## Build
##
FROM golang:latest as build
FROM golang:1.22.1-bookworm as build

LABEL org.opencontainers.image.source="https://github.com/cam-inc/MxTransporter"

Expand All @@ -24,7 +24,7 @@ RUN go install ./cmd/health.go
##
## Deploy
##
FROM alpine:latest
FROM alpine:3.19.1

WORKDIR /go/src

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest
FROM golang:1.22.1-bookworm

WORKDIR /go/src

Expand Down
4 changes: 1 addition & 3 deletions docker-compose.mongo-replica.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.8'

services:

mongodb-primary:
image: mongo
command:
Expand All @@ -22,7 +21,7 @@ services:

mongodb-secondary:
image: mongo
command:
command:
- --replSet
- rs0
volumes:
Expand All @@ -39,4 +38,3 @@ services:
expose:
- 27017
restart: always

5 changes: 2 additions & 3 deletions docker-compose.mxt-local.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.8'

services:

mxt:
build:
context: '.'
Expand All @@ -21,12 +20,12 @@ services:
extends:
file: docker-compose.mongo-replica.yml
service: mongodb-primary

mongodb-secondary:
extends:
file: docker-compose.mongo-replica.yml
service: mongodb-secondary

mongodb-arbiter:
extends:
file: docker-compose.mongo-replica.yml
Expand Down

0 comments on commit 5f69ba5

Please sign in to comment.