Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre818181 committed Dec 23, 2024
1 parent b3e1fd1 commit 749e1f9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Releases

on:
push:
tags:
- v*.*.*

jobs:
build-and-publish:
runs-on: ubuntu-latest
env:
IMAGE_NAME: pierre781/sls-local-server

steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
submodules: 'true'

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

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
cache: 'go-mod'

- name: Install bun
uses: oven-sh/setup-bun@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: pierre781
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- run: go build -o main main.go

- run:
docker build -t pierre781/sls-local-server:${{ github.ref_name }} -f Dockerfile .
docker push pierre781/sls-local-server:${{ github.ref_name }}

0 comments on commit 749e1f9

Please sign in to comment.