Merge pull request #86 from dtinit/workflows-updates #18
This file contains 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: Notify Portmap | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
validate-articles: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run sanity check | |
run: | | |
chmod +x sanity_check.sh | |
./sanity_check.sh | |
notify-portmap: | |
runs-on: ubuntu-latest | |
needs: validate-articles # This ensures the notify-portmap job only runs if validate-articles passes | |
steps: | |
- name: Send repository_dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.PORTMAP_REPOSITORY_DISPATCH_PAT }} | |
repository: dtinit/portmap | |
event-type: content_update |