ci: Add deployment steps

This commit is contained in:
oSumAtrIX 2024-06-29 14:41:18 +02:00
parent d92c1cf373
commit ba936ad134
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -84,3 +84,17 @@ jobs:
build-args: |
GITHUB_ACTOR=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
- name: Set Portainer stack webhook URL based on branch
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
PORTAINER_WEBHOOK_URL=${{ secrets.PORTAINER_WEBHOOK_MAIN_URL }}
else
PORTAINER_WEBHOOK_URL=${{ secrets.PORTAINER_WEBHOOK_DEV_URL }}
fi
echo "PORTAINER_WEBHOOK_URL=$PORTAINER_WEBHOOK_URL" >> $GITHUB_ENV
- name: Trigger Portainer stack update
uses: newarifrh/portainer-service-webhook@v1
with:
webhook_url: ${{ env.PORTAINER_WEBHOOK_URL }}