Files
go_blog/.gitea/workflows/go.yaml
2024-12-16 18:00:19 +08:00

27 lines
534 B
YAML

name: Go build
on:
push:
branches:
- master
paths:
- 'main.go'
jobs:
docker:
name: build and run
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: https://gitea.com/actions/checkout@v4
- name: Set up Docker Buildx
uses: https://gitea.com/docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker build -t go_blog:latest -f ./Dockerfile .
- name: Run Docker container
run: |
docker run -d -p 8910:8910 go_blog:latest