Remove load .env from bin path
Some checks failed
build docker image / docker-build (push) Failing after 51s

This commit is contained in:
Illya Marchenko 2024-11-04 19:44:42 +02:00
parent 074c32a8f1
commit b05b1b9b48
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,36 @@
name: build docker image
on:
- push
jobs:
docker-build:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: gitea.stuzer.link
username: ${{ gitea.repository_owner }}
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
build-args: |
APP_URL="${{ vars.APP_URL }}"
tags: gitea.stuzer.link/stuzer05/monobank-firefly3-bot:latest
cache-from: type=registry,ref=gitea.stuzer.link/stuzer05/monobank-firefly3-bot:latest
cache-to: type=inline

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM golang:1.23.2 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# Copy project files
COPY . .
# Build
RUN go mod download \
&& make
FROM scratch
COPY --from=builder /app/monobank-firefly3-bot /app
ENTRYPOINT ["/app"]