Files
pictshare-browse/.gitea/workflows/ci.yml
2025-07-23 18:53:38 +00:00

50 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install system Dependencies
run: |
apt-get update && apt-get install -y curl jq docker.io
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install NPM dependencies
run: npm install
- name: Lint (if ESLint is configured)
run: |
if [ -f .eslintrc.js ] || [ -f .eslintrc.json ] || [ -f .eslintrc ]; then
npx eslint .
else
echo "No ESLint config found, skipping lint."
fi
# - name: Run tests (uncomment if you add tests)
# run: npm test
- name: Build Docker image
run: docker build -t pictshare-browse:latest .
# - name: Push Docker image (customize for your registry)
# run: |
# echo ${{ secrets.REGISTRY_PASSWORD }} | docker login -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin your.registry.url
# docker tag pictshare-browse:latest your.registry.url/youruser/pictshare-browse:latest
# docker push your.registry.url/youruser/pictshare-browse:latest