diff options
Diffstat (limited to '.github/workflows/update_publicsuffix_data.yml')
-rw-r--r-- | .github/workflows/update_publicsuffix_data.yml | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/.github/workflows/update_publicsuffix_data.yml b/.github/workflows/update_publicsuffix_data.yml index 3481e7aa..27a2ab14 100644 --- a/.github/workflows/update_publicsuffix_data.yml +++ b/.github/workflows/update_publicsuffix_data.yml @@ -8,22 +8,26 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Download new publicsuffix data run: curl -L https://github.com/mozilla-mobile/android-components/raw/master/components/lib/publicsuffixlist/src/main/assets/publicsuffixes -o app/src/main/assets/publicsuffixes + - name: Compare list changes run: if [[ $(git diff --binary --stat) != '' ]]; then echo "::set-env name=UPDATED::true"; fi + + - name: Commit changes + if: env.UPDATED == 'true' + run: | + git checkout -b bot/update-psl + git add app/src/main/assets/publicsuffixes + git commit --message "Update Public Suffix List data' + - name: Create update PR - uses: peter-evans/create-pull-request@v2 + uses: thomaseizinger/create-pull-request@1.0.0 if: env.UPDATED == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_PERSONAL_TOKEN }} with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: 'Update Public Suffix List data' - committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + head: bot/update-psl + base: develop title: 'Update Public Suffix List data' body: 'Updates Public Suffix List from https://publicsuffix.org/list/' - assignees: msfjarvis - labels: PSL - branch: bot/update-psl |