From 9b892d12314e2e3fde0d1375c20519cc6a43517d Mon Sep 17 00:00:00 2001 From: axif Date: Mon, 16 Dec 2024 17:30:44 +0600 Subject: [PATCH 1/2] feat: org repo check --- .../workflows/matrix_dev_sync_reminder.yml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/matrix_dev_sync_reminder.yml b/.github/workflows/matrix_dev_sync_reminder.yml index ea4aad2..bdc557c 100644 --- a/.github/workflows/matrix_dev_sync_reminder.yml +++ b/.github/workflows/matrix_dev_sync_reminder.yml @@ -8,7 +8,24 @@ env: FIRST_RUN_DATE: "2024-11-13" jobs: + check-repository: + runs-on: ubuntu-latest + outputs: + is_correct_repo: ${{ steps.check.outputs.is_correct_repo }} + steps: + - name: Check repository + id: check + run: | + if [ "$GITHUB_REPOSITORY" = "scribe-org/Organization" ]; then + echo "is_correct_repo=true" >> "$GITHUB_OUTPUT" + else + echo "is_correct_repo=false" >> "$GITHUB_OUTPUT" + echo "::warning::This workflow should only run in scribe-org/Organization repository." + fi + weekindex: + needs: check-repository + if: needs.check-repository.outputs.is_correct_repo == 'true' runs-on: ubuntu-latest outputs: weekindex: ${{ steps.calculate.outputs.weekindex }} @@ -56,6 +73,7 @@ jobs: runs-on: ubuntu-latest needs: - weekindex + - check-repository steps: - name: Format EPOCH Time id: epoch-time @@ -183,4 +201,4 @@ jobs: Please reply in the thread for this message with anything you'd like to discuss ๐Ÿงต - Thanks and have a great day! ๐Ÿ’™ + Thanks and have a great day! ๐Ÿ’™ \ No newline at end of file From cc9dd03bc45b5e50323aa1fed72df4cf7f5549be Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Mon, 16 Dec 2024 15:21:30 +0100 Subject: [PATCH 2/2] Fix end of file for workflow --- .github/workflows/matrix_dev_sync_reminder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix_dev_sync_reminder.yml b/.github/workflows/matrix_dev_sync_reminder.yml index bdc557c..4441965 100644 --- a/.github/workflows/matrix_dev_sync_reminder.yml +++ b/.github/workflows/matrix_dev_sync_reminder.yml @@ -201,4 +201,4 @@ jobs: Please reply in the thread for this message with anything you'd like to discuss ๐Ÿงต - Thanks and have a great day! ๐Ÿ’™ \ No newline at end of file + Thanks and have a great day! ๐Ÿ’™