Update .dockerignore and improve Gitea CI workflow
- Expanded `.dockerignore` to include additional build artifacts, OS files, test files, IDE files, logs, and docs. - Enhanced Gitea CI workflow by integrating `docker/setup-buildx-action` and switching to `docker/build-push-action` with caching support.
This commit is contained in:
parent
1c0165cf73
commit
66a77babfe
2 changed files with 47 additions and 8 deletions
|
|
@ -1,6 +1,38 @@
|
|||
# Build artifacts
|
||||
target/
|
||||
src/frontend/node_modules/
|
||||
src/frontend/dist/
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.iml
|
||||
.eclipse/
|
||||
.settings/
|
||||
|
||||
# Git
|
||||
.git/
|
||||
.gitignore
|
||||
.gitattributes
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
logs/
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Tests
|
||||
src/test/
|
||||
**/*test.js
|
||||
**/*.spec.js
|
||||
|
||||
# Documentation
|
||||
*.md
|
||||
docs/
|
||||
|
||||
# Environment
|
||||
.env
|
||||
.env.*
|
||||
|
|
@ -17,13 +17,20 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.avatic.de -u "${{ gitea.actor }}" --password-stdin
|
||||
|
||||
- name: Build and push
|
||||
run: |
|
||||
docker build -t git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} .
|
||||
docker tag git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
|
||||
docker push git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }}
|
||||
docker push git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }}
|
||||
git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
|
||||
cache-from: type=registry,ref=git.avatic.de/${{ gitea.repository_owner }}/lcc:buildcache
|
||||
cache-to: type=registry,ref=git.avatic.de/${{ gitea.repository_owner }}/lcc:buildcache,mode=max
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue