From 48fbb61dcc225dff1a0605af501f15cb8b5740ab Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Tue, 8 Jun 2021 16:10:00 +0530 Subject: [PATCH] FIX: populate repository name from global object --- .github/workflows/plugin-linting.yml | 2 ++ .github/workflows/plugin-tests.yml | 17 +++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/plugin-linting.yml b/.github/workflows/plugin-linting.yml index a121658d..a79c5462 100644 --- a/.github/workflows/plugin-linting.yml +++ b/.github/workflows/plugin-linting.yml @@ -6,6 +6,8 @@ on: - master - main pull_request: + schedule: + - cron: '0 0 * * *' jobs: build: diff --git a/.github/workflows/plugin-tests.yml b/.github/workflows/plugin-tests.yml index ce228136..84e055ca 100644 --- a/.github/workflows/plugin-tests.yml +++ b/.github/workflows/plugin-tests.yml @@ -6,6 +6,8 @@ on: - master - main pull_request: + schedule: + - cron: '0 0 * * *' jobs: build: @@ -51,23 +53,26 @@ jobs: repository: discourse/discourse fetch-depth: 1 + - run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV + shell: bash + - name: Install plugin uses: actions/checkout@v2 with: - path: plugins/${{ github.event.repository.name }} + path: plugins/${{ env.REPOSITORY_NAME }} fetch-depth: 1 - name: Check spec existence id: check_spec uses: andstor/file-existence-action@v1 with: - files: "plugins/${{ github.event.repository.name }}/spec" + files: "plugins/${{ env.REPOSITORY_NAME }}/spec" - name: Check qunit existence id: check_qunit uses: andstor/file-existence-action@v1 with: - files: "plugins/${{ github.event.repository.name }}/test/javascripts" + files: "plugins/${{ env.REPOSITORY_NAME }}/test/javascripts" - name: Setup Git run: | @@ -100,7 +105,7 @@ jobs: - name: Lint English locale if: matrix.build_type == 'backend' - run: bundle exec ruby script/i18n_lint.rb "plugins/${{ github.event.repository.name }}/locales/{client,server}.en.yml" + run: bundle exec ruby script/i18n_lint.rb "plugins/${{ env.REPOSITORY_NAME }}/locales/{client,server}.en.yml" - name: Get yarn cache directory id: yarn-cache-dir @@ -125,9 +130,9 @@ jobs: - name: Plugin RSpec with Coverage if: matrix.build_type == 'backend' && steps.check_spec.outputs.files_exists == 'true' - run: SIMPLECOV=1 bin/rake plugin:spec[${{ github.event.repository.name }}] + run: SIMPLECOV=1 bin/rake plugin:spec[${{ env.REPOSITORY_NAME }}] - name: Plugin QUnit if: matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exists == 'true' - run: bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000'] + run: bundle exec rake plugin:qunit['${{ env.REPOSITORY_NAME }}','1200000'] timeout-minutes: 30