From 6cee8871f3a618cebab2b5d5dd065d983743a048 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Mon, 11 Oct 2021 16:34:32 +0300 Subject: [PATCH 1/4] Create a new cron Github Action workflow for syncing emojis & sas strings. It will run every Monday at 00:00. It will open two PRs and will be able to optimal update/delete them according to changes with the base branch --- .../workflows/sync-from-external-soruces.yml | 70 +++++++++++++++++++ changelog.d/4216.misc | 1 + 2 files changed, 71 insertions(+) create mode 100644 .github/workflows/sync-from-external-soruces.yml create mode 100644 changelog.d/4216.misc diff --git a/.github/workflows/sync-from-external-soruces.yml b/.github/workflows/sync-from-external-soruces.yml new file mode 100644 index 0000000000..d5207d4b96 --- /dev/null +++ b/.github/workflows/sync-from-external-soruces.yml @@ -0,0 +1,70 @@ +name: Sync Data From External Sources +on: + schedule: + # At 00:00 on every Monday UTC + - cron: '0 0 * * 1' + +jobs: + sync-emojis: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install Prerequisite dependencies + run: | + pip install BeautifulSoup4 + pip install requests + - name: Run Emoji script + run: ./tools/import_emojis.py + - name: Create Pull Request for Emojis + uses: peter-evans/create-pull-request@v3 + with: + commit-message: Sync Emojis + title: Sync Emojis + body: | + - Update Emojis from Unicode.org + branch: sync-emojis + base: develop + + sync-sas-strings: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install Prerequisite dependencies + run: | + pip install BeautifulSoup4 + pip install requests + - name: Run SAS String script + run: ./tools/import_sas_strings.py + - name: Create Pull Request for SAS Strings + uses: peter-evans/create-pull-request@v3 + with: + commit-message: Sync SAS Strings + title: Sync SAS Strings + body: | + - Update SAS Strings from matrix-doc. + branch: sync-sas-strings + base: develop \ No newline at end of file diff --git a/changelog.d/4216.misc b/changelog.d/4216.misc new file mode 100644 index 0000000000..7a3ec23ee5 --- /dev/null +++ b/changelog.d/4216.misc @@ -0,0 +1 @@ +Implement a new github action workflow to generate two PRs for emoji and sas string sync, issue 3902 | PR 4216 From dcf98d93e637f4195080613e7164531a4adad522 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Tue, 12 Oct 2021 11:37:00 +0300 Subject: [PATCH 2/4] Remove BeautifulSoup4 dependency --- .github/workflows/sync-from-external-soruces.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync-from-external-soruces.yml b/.github/workflows/sync-from-external-soruces.yml index d5207d4b96..6a4f8ef147 100644 --- a/.github/workflows/sync-from-external-soruces.yml +++ b/.github/workflows/sync-from-external-soruces.yml @@ -55,7 +55,6 @@ jobs: ${{ runner.os }}- - name: Install Prerequisite dependencies run: | - pip install BeautifulSoup4 pip install requests - name: Run SAS String script run: ./tools/import_sas_strings.py From fc753fe11ec03c85a8a3e72f5587c0917135d807 Mon Sep 17 00:00:00 2001 From: Aris Kotsomitopoulos <60798129+ariskotsomitopoulos@users.noreply.github.com> Date: Tue, 12 Oct 2021 11:52:52 +0300 Subject: [PATCH 3/4] Update 4216.misc --- changelog.d/4216.misc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/4216.misc b/changelog.d/4216.misc index 7a3ec23ee5..acf5f1dbcb 100644 --- a/changelog.d/4216.misc +++ b/changelog.d/4216.misc @@ -1 +1 @@ -Implement a new github action workflow to generate two PRs for emoji and sas string sync, issue 3902 | PR 4216 +Implement a new github action workflow to generate two PRs for emoji and sas string sync From 2b2f5be83e3049a207d4ac41f02212a84aff2323 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Tue, 12 Oct 2021 15:51:27 +0300 Subject: [PATCH 4/4] Fix typo in filename --- ...c-from-external-soruces.yml => sync-from-external-sources.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{sync-from-external-soruces.yml => sync-from-external-sources.yml} (100%) diff --git a/.github/workflows/sync-from-external-soruces.yml b/.github/workflows/sync-from-external-sources.yml similarity index 100% rename from .github/workflows/sync-from-external-soruces.yml rename to .github/workflows/sync-from-external-sources.yml