Skip to content

Commit

Permalink
Create docker release
Browse files Browse the repository at this point in the history
  • Loading branch information
canack committed Jan 6, 2024
1 parent 23b5149 commit 06d47dd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,25 @@ jobs:
artifacts: "release/gama-linux-amd64,release/gama-windows-amd64.exe,release/gama-macos-amd64,release/gama-macos-arm64"
token: ${{ secrets.GIT_TOKEN }}
draft: true

# Docker build and push steps
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/gama:${{ env.LATEST_TAG }}
${{ secrets.DOCKER_USERNAME }}/gama:latest
build-args: |
TERM=xterm-256color
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This dockerfile is used by workflow to build the docker image
# It is not used to build the binary from scratch
FROM alpine:latest

WORKDIR /app

COPY release/gama-linux-amd64 /app/gama

# Set environment variable for color output
ENV TERM xterm-256color

ENTRYPOINT ["/app/gama"]
Empty file removed build/README.md
Empty file.

0 comments on commit 06d47dd

Please sign in to comment.