30 lines
799 B
YAML
30 lines
799 B
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Registry
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login 192.168.1.183:3100 -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
docker build -t 192.168.1.183:3100/adminpepe/lageplan:latest .
|
|
|
|
- name: Push to Registry
|
|
run: |
|
|
docker push 192.168.1.183:3100/adminpepe/lageplan:latest
|
|
|
|
- name: Redeploy via Portainer
|
|
if: ${{ secrets.PORTAINER_WEBHOOK != '' }}
|
|
run: |
|
|
curl -sf -X POST "${{ secrets.PORTAINER_WEBHOOK }}" || echo "Portainer webhook failed (optional)"
|