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/
|
target/
|
||||||
src/frontend/node_modules/
|
node_modules/
|
||||||
src/frontend/dist/
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.iml
|
||||||
|
.eclipse/
|
||||||
|
.settings/
|
||||||
|
|
||||||
|
# Git
|
||||||
.git/
|
.git/
|
||||||
.gitignore
|
.gitignore
|
||||||
*.md
|
.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
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.avatic.de -u "${{ gitea.actor }}" --password-stdin
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.avatic.de -u "${{ gitea.actor }}" --password-stdin
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
run: |
|
uses: docker/build-push-action@v5
|
||||||
docker build -t git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} .
|
with:
|
||||||
docker tag git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
|
context: .
|
||||||
docker push git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }}
|
push: true
|
||||||
docker push git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
|
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