Add test ngrok URL for testing BE integration #7
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: Update Phishing Detection Datasets | |
on: | |
push: | |
jobs: | |
update_data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
repository: duckduckgo/macos-browser | |
path: macos/ | |
token: ${{ secrets.DAX_MACOS_BROWSER_PHISHING_AUTOMATION }} | |
- name: Execute Update Script | |
run: | | |
cd ./macos | |
REVISION="$(bash ./scripts/update_phishing_detection_data.sh | grep -oP 'Updated revision from \K\d+')" | |
create_pr: | |
runs-on: ubuntu-latest | |
outputs: | |
pull-request-url: ${{ steps.create-pr.outputs.pull-request-url }} | |
steps: | |
- name: Create macOS PR Body | |
run: | | |
TEMPLATE="$(bash ./scripts/update_phishing_detection_data.sh pr-body)" | |
PR_BODY_MACOS="${TEMPLATE//\{\{revision\}\}/$REVISION}" | |
# --- Effect --- | |
- name: Create PR for macOS | |
uses: peter-evans/create-pull-request@88bf0de51c7487d91e1abbb4899332e602c58bbf | |
id: create-pr | |
with: | |
path: macos/ | |
add-paths: | | |
./DuckDuckGo/PhishingDetection/ | |
commit-message: Update phishing detection data to revision $REVISION | |
branch: update-phishing-protection-$REVISION | |
title: Update phishing protection datasets to $REVISION | |
body: "${{ env.PR_BODY_MACOS }}" | |
token: ${{ secrets.DAX_MACOS_BROWSER_PHISHING_AUTOMATION }} | |