[pull] master from botpress:master #749
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Integration Versions | |
| on: pull_request | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| check-integration-versions: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Login to Botpress | |
| run: pnpm bp login -y --token ${{ secrets.PRODUCTION_TOKEN_CLOUD_OPS_ACCOUNT }} --workspace-id ${{ secrets.PRODUCTION_CLOUD_OPS_WORKSPACE_ID }} | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v46 | |
| with: | |
| files: 'integrations/**/*.{ts,md,svg}' | |
| separator: '\n' | |
| - name: Check integration versions | |
| run: | | |
| modified_integrations=$(echo -e "${{ steps.changed-files.outputs.all_changed_files }}" | awk -F'/' '{print $2}' | sort -u) | |
| should_fail=0 | |
| for integration in $modified_integrations; do | |
| echo "Checking $integration" | |
| exists=$(./.github/scripts/integration-exists.sh $integration) | |
| if [ $exists -ne 0 ]; then | |
| echo "Integration $integration is already deployed publicly with the same version. Please update the version of your integration." | |
| should_fail=1 | |
| fi | |
| done | |
| if [ $should_fail -ne 0 ]; then | |
| echo "Please update the version of your integration before pushing your changes." | |
| exit 1 | |
| fi |