diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..3be16f0 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,20 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Vendor mod file + run: go mod vendor + - name: Build the Docker image + run: docker build . --file Dockerfile --tag ghcr.io/debabky/relayer-svc && docker push ghcr.io/debabky/relayer-svc diff --git a/Dockerfile b/Dockerfile index f44d2c2..3df69aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine as buildbase +FROM golang:1.22-alpine as buildbase RUN apk add git build-base