Skip to content

connector-update

connector-update #1345

name: Connectors - Update Ballerina Version
on:
workflow_dispatch:
inputs:
ballerinaVersion:
description: 'Ballerina Version'
required: true
autoMergePRs:
description: 'Auto Merge PRs'
required: false
default: 'true'
repository_dispatch:
types: [ connector-update ]
jobs:
update-lang-version:
name: Update Ballerina Lang Version
if: github.repository_owner == 'ballerina-platform'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Python Packages
run: |
pip install requests
pip install retry
pip install PyGithub
pip install cryptography
- name: Update Ballerina Language Version
run: |
if ${IS_SCHEDULE_WORKFLOW} == true; then
echo "Schedule Workflow Triggered"
python dependabot/update_connectors.py "${{ github.event.client_payload.ballerinaVersion }}" \
"true" "repository_dispatch"
else
echo "Manual Trigger"
python dependabot/update_connectors.py "${{ github.event.inputs.ballerinaVersion }}" \
"${{ github.event.inputs.autoMergePRs }}"
fi
env:
IS_SCHEDULE_WORKFLOW: ${{ github.event_name == 'repository_dispatch' }}
BALLERINA_BOT_USERNAME: ${{ secrets.BALLERINA_BOT_USERNAME }}
BALLERINA_BOT_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
BALLERINA_BOT_EMAIL: ${{ secrets.BALLERINA_BOT_EMAIL }}
BALLERINA_REVIEWER_BOT_TOKEN: ${{ secrets.BALLERINA_REVIEWER_BOT_TOKEN }}
ENV_USER_ENCRYPTION_KEY: ${{secrets.USER_ENCRYPTION_KEY}}