Skip to content

Update Docker Image To demisto/googleapi-python3 #18176

Update Docker Image To demisto/googleapi-python3

Update Docker Image To demisto/googleapi-python3 #18176

name: Handle New External PRs
on:
pull_request_target:
types: [opened]
permissions:
contents: read
jobs:
handle_new_external_pr:
runs-on: ubuntu-latest
if: github.repository == 'demisto/content' && github.event.action == 'opened' && github.event.pull_request.head.repo.fork == true && contains(github.head_ref, 'xsoar-bot-contrib-ContributionTestPack') == false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
- name: Print Context
run: |
echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Install Python Dependencies
run: |
poetry install --with ci
- name: Update External PR
env:
CONTENTBOT_GH_ADMIN_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }}
EVENT_PAYLOAD: ${{ toJson(github.event) }}
run: |
echo "Updating External PR ${{ github.event.pull_request.html_url }}"
cd Utils/github_workflow_scripts
poetry run ./handle_external_pr.py
echo "Finished Handling External PR"
- name: Send Notification
env:
CONTENTBOT_GH_ADMIN_TOKEN: ${{ secrets.CONTENTBOT_GH_ADMIN_TOKEN }}
EVENT_PAYLOAD: ${{ toJson(github.event) }}
CORTEX_XSOAR_SLACK_TOKEN: ${{ secrets.CORTEX_XSOAR_SLACK_TOKEN }}
run: |
echo "Sending notification about External PR ${{ github.event.pull_request.html_url }}"
cd Utils/github_workflow_scripts
poetry run ./send_slack_message.py