Skip to content

Commit

Permalink
Optimize (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
BachErik authored Jul 7, 2024
2 parents d1b7328 + a9a69df commit ee581d3
Show file tree
Hide file tree
Showing 16 changed files with 464 additions and 305 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
bacherik/killedby:${{ github.event_name == 'push' && 'latest' || github.event_name == 'release' && github.event.release.tag_name || 'pr-' }}${{ github.event.pull_request.number || '' }}
- name: Logout from DockerHub
run: docker logout
40 changes: 0 additions & 40 deletions .github/workflows/deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output/
cache/

# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use an official Golang runtime as a parent image
FROM golang:1.22.4-alpine

# Set the working directory inside the container
WORKDIR /app

# Copy the go.mod and go.sum files into the working directory
COPY go.mod go.sum ./

# Install dependencies
RUN go mod download

# Copy the entire project and build it
COPY . .

# Build the Go app
RUN go build -o /killedby

# Expose port 8080 to the outside world
EXPOSE 8080

# Command to run the executable
CMD ["/killedby"]
19 changes: 0 additions & 19 deletions assets/css/custom.css

This file was deleted.

Binary file removed assets/img/BachErik.png
Binary file not shown.
65 changes: 0 additions & 65 deletions companies/BachErik.json

This file was deleted.

Loading

0 comments on commit ee581d3

Please sign in to comment.