Skip to content

fix dockerfile; remove godotenv #24

fix dockerfile; remove godotenv

fix dockerfile; remove godotenv #24

name: Build and Push Go Binary to S3
on:
push:
branches:
- main # Change this to your default branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20' # Change this to your desired Go version
- name: Build Go Binary
run: go build -o myapp cmd/server/main.go
- name: Upload to S3
uses: a-sync/s3-uploader@2.0.1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
AWS_REGION: "us-east-1"
S3_BUCKET: "shorturl-binaries"
S3_KEY: 'myapp'
FILE: "./myapp"