Skip to content

add ci

add ci #1

Workflow file for this run

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 }}