Skip to content

Commit

Permalink
Move PR into same job as data script update
Browse files Browse the repository at this point in the history
  • Loading branch information
not-a-rootkit authored Jun 14, 2024
1 parent b9b56cf commit 0d26e19
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/update_phishing_detection_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@ jobs:
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: |
echo "REVISION=$REVISION" >> $GITHUB_ENV
TEMPLATE="$(bash ./scripts/update_phishing_detection_data.sh pr-body)"
PR_BODY_MACOS="${TEMPLATE//\{\{revision\}\}/$REVISION}"
# --- Effect ---
echo "PR_BODY_MACOS=$PR_BODY_MACOS" >> $GITHUB_ENV
- 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
commit-message: Update phishing detection data to revision ${{ env.REVISION }}
branch: update-phishing-protection-${{ env.REVISION }}
title: Update phishing protection datasets to ${{ env.REVISION }}
body: "${{ env.PR_BODY_MACOS }}"
token: ${{ secrets.DAX_MACOS_BROWSER_PHISHING_AUTOMATION }}


0 comments on commit 0d26e19

Please sign in to comment.