Add Deploy step

This commit is contained in:
2025-09-08 20:51:41 +02:00
parent 35ec71302b
commit cfb69c8dab

View File

@@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- '*'
pull_request: ~
workflow_dispatch: ~
@@ -18,6 +20,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker images
@@ -53,12 +57,17 @@ jobs:
run: docker compose exec -T php vendor/bin/phpunit
- name: Doctrine Schema Validator
run: docker compose exec -T php bin/console -e test doctrine:schema:validate
lint:
name: Docker Lint
deploy:
name: Deploy
environment:
name: ${{ startsWith(github.ref, 'refs/tags/') && 'production' || (github.ref == 'refs/heads/main' && 'acceptance' || '') }}
url: ${{ vars.URL }}
needs: tests
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.1.0
- shell: bash
env:
PORTAINER_WEBHOOK: ${{secrets.PORTAINER_WEBHOOK}}
run: |
curl -v -X POST "$PORTAINER_WEBHOOK"