Some checks failed
Build Pogdark API / Build Pogdark API (push) Failing after 5m4s
43 lines
901 B
YAML
43 lines
901 B
YAML
name: Build Pogdark API
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Pogdark API
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.22' # Specify the desired Go version
|
|
|
|
- name: Download Dependencies
|
|
run: |
|
|
go mod download
|
|
|
|
- name: Build Go Binary
|
|
run: |
|
|
go build -o pogdark-api .
|
|
|
|
- name: Confirm file presence
|
|
run: |
|
|
pwd && ls -al /workspace/public/ && ls -al .
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
docker build -t localhost:5000/pogdark-api:latest .
|
|
|
|
- name: Push Docker Image to Local Registry
|
|
run: |
|
|
docker push localhost:5000/pogdark-api:latest |