change trigger

This commit is contained in:
zhangchao
2024-12-16 18:00:19 +08:00
parent 5ead21c60f
commit 2947fa7d3e
2 changed files with 4 additions and 23 deletions

View File

@@ -1,21 +0,0 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on: [push]
jobs:
container-job:
name: my first job test
runs-on: ubuntu-latest
container:
image: golang:latest
env:
GO111MODULE: on
GOPROXY: https://goproxy.cn,direct
ports:
- 8080
volumes:
- /data:/data
steps:
- name: Check for dockerenv file1
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

View File

@@ -3,6 +3,8 @@ on:
push:
branches:
- master
paths:
- 'main.go'
jobs:
docker:
@@ -18,8 +20,8 @@ jobs:
- name: Build Docker image
run: |
docker build -t your-image-name:latest -f ./Dockerfile .
docker build -t go_blog:latest -f ./Dockerfile .
- name: Run Docker container
run: |
docker run -d -p 8910:8910 your-image-name:latest
docker run -d -p 8910:8910 go_blog:latest