diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..1035935 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,37 @@ +name: Deploy Docker Container + +on: + workflow_run: + workflows: ["Build and Push Docker Image"] + types: + - completed + branches: + - main + - dev + +jobs: + deploy: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_branch }} + + - name: Deploy to Docker + run: | + mkdir -p ~/.ssh + echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key + chmod 600 ~/.ssh/deploy_key + ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts + + BRANCH="${{ github.event.workflow_run.head_branch }}" + DEPLOY_PATH="${{ secrets.DEPLOY_PATH }}" + + ssh -i ~/.ssh/deploy_key ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << EOF + cd ${DEPLOY_PATH} + docker-compose pull lcc-app-${BRANCH} + docker-compose --profile ${BRANCH} up -d lcc-app-${BRANCH} + EOF \ No newline at end of file diff --git a/renovate.json b/renovate.json index 7190a60..6761452 100644 --- a/renovate.json +++ b/renovate.json @@ -1,3 +1,67 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json" -} + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "timezone": "Europe/Berlin", + "schedule": [ + "before 6am on monday" + ], + "labels": [ + "dependencies" + ], + "prConcurrentLimit": 5, + "packageRules": [ + { + "description": "Gruppiere Spring Boot Dependencies", + "groupName": "Spring Boot", + "matchPackagePrefixes": [ + "org.springframework.boot", + "org.springframework" + ] + }, + { + "description": "Gruppiere Vue.js Ecosystem", + "groupName": "Vue.js", + "matchPackagePrefixes": [ + "vue", + "@vue" + ] + }, + { + "description": "Auto-merge für Minor und Patch Updates", + "matchUpdateTypes": [ + "minor", + "patch" + ], + "automerge": true, + "automergeType": "pr" + }, + { + "description": "Major Updates manuell prüfen", + "matchUpdateTypes": [ + "major" + ], + "automerge": false, + "labels": [ + "dependencies", + "major-update" + ] + }, + { + "description": "Docker Base Images wöchentlich prüfen", + "matchDatasources": [ + "docker" + ], + "schedule": [ + "before 6am on monday" + ] + } + ], + "vulnerabilityAlerts": { + "enabled": true, + "labels": [ + "security" + ] + } +} \ No newline at end of file