workflow first try...
This commit is contained in:
@@ -1,59 +1,12 @@
|
|||||||
# Build artifacts and dependencies
|
.git
|
||||||
target/
|
|
||||||
.mvn/
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
*.iws
|
|
||||||
|
|
||||||
# IDE files
|
|
||||||
.idea/
|
|
||||||
.vscode/
|
|
||||||
*.sublime-*
|
|
||||||
.eclipse
|
|
||||||
.project
|
|
||||||
.classpath
|
|
||||||
.settings/
|
|
||||||
|
|
||||||
# OS files
|
|
||||||
.DS_Store
|
|
||||||
Thumbs.db
|
|
||||||
|
|
||||||
# Version control
|
|
||||||
.git/
|
|
||||||
.gitignore
|
.gitignore
|
||||||
.gitattributes
|
**/target/
|
||||||
|
**/.buildx-cache/
|
||||||
# Documentation and scripts (comment out if needed in container)
|
.buildx-cache/
|
||||||
README.md
|
**/log/
|
||||||
*.md
|
|
||||||
deploy.sh
|
|
||||||
rollback.sh
|
|
||||||
fetch-log.sh
|
|
||||||
|
|
||||||
# Docker files (avoid recursion)
|
|
||||||
docker/
|
|
||||||
Dockerfile*
|
|
||||||
docker-compose*
|
|
||||||
|
|
||||||
# Logs and temp files
|
|
||||||
log/
|
log/
|
||||||
logs/
|
**/.DS_Store
|
||||||
*.log
|
.DS_Store
|
||||||
*.tmp
|
.vscode/
|
||||||
|
**/.idea/
|
||||||
# Backup files
|
**/.serena/
|
||||||
backup/
|
|
||||||
*.backup
|
|
||||||
*.bak
|
|
||||||
|
|
||||||
# Environment files
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
|
|
||||||
# Test files
|
|
||||||
**/src/test/
|
|
||||||
|
|
||||||
# Maven wrapper (we install Maven in container)
|
|
||||||
.mvn/
|
|
||||||
mvnw
|
|
||||||
mvnw.cmd
|
|
||||||
|
|||||||
40
.gitea/workflows/backend-docker.yml
Normal file
40
.gitea/workflows/backend-docker.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Build and Push Backend
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master, main ]
|
||||||
|
paths:
|
||||||
|
- 'docker/**'
|
||||||
|
- 'play-admin/**'
|
||||||
|
- 'play-common/**'
|
||||||
|
- 'play-generator/**'
|
||||||
|
- 'pom.xml'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Ensure buildx is available
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
docker buildx version || true
|
||||||
|
docker buildx create --use || true
|
||||||
|
|
||||||
|
- name: Build and push to local registry
|
||||||
|
env:
|
||||||
|
REGISTRY: 127.0.0.1:5000
|
||||||
|
TAG: ${{ github.sha }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64 \
|
||||||
|
-f docker/Dockerfile \
|
||||||
|
-t ${REGISTRY}/peipei/backend:${TAG} \
|
||||||
|
-t ${REGISTRY}/peipei/backend:latest \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
|
|
||||||
Reference in New Issue
Block a user