keyguard-app-Bitwarden-Vaul.../.github/workflows/update_tld.yml

42 lines
1.5 KiB
YAML
Raw Normal View History

2023-12-29 17:38:23 +01:00
name: "🕒 Synchronize TLD public suffix list"
on:
workflow_dispatch:
jobs:
sync-tld:
name: Synchronize TLD public suffix list
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Update data"
run: |
wget https://publicsuffix.org/list/public_suffix_list.dat
mv -f public_suffix_list.dat common/src/commonMain/composeResources/files/public_suffix_list.txt
2023-12-29 17:38:23 +01:00
- name: "Check if any changes"
id: check-changes
run: |
has_changes=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)
echo "$has_changes"
echo "HAS_CHANGES=$has_changes" >> "$GITHUB_OUTPUT"
2023-12-29 17:38:23 +01:00
- name: Commit and push changes
uses: devops-infra/action-commit-push@v0.9.2
if: ${{ startsWith(steps.check-changes.outputs.HAS_CHANGES, 'true') }}
with:
github_token: "${{ secrets.PERSONAL_TOKEN }}"
add_timestamp: false
commit_prefix: "[AUTO]"
commit_message: "Update Public suffix list"
force: true
target_branch: tld_public_suffix_list_action
- name: Create pull request
uses: devops-infra/action-pull-request@v0.5.5
if: ${{ startsWith(steps.check-changes.outputs.HAS_CHANGES, 'true') }}
with:
github_token: "${{ secrets.PERSONAL_TOKEN }}"
source_branch: tld_public_suffix_list_action
target_branch: master
assignee: AChep
label: "robot,enhancement"
title: New Public suffix list by GitHub Action