From 7574f302e3a0045f47ffce15c111ed09598a20d3 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 28 Apr 2023 14:35:15 +0800 Subject: [PATCH] run only on PRs --- .github/workflows/tests.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7535fb7..a8a308b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,5 @@ name: CI -on: [push, pull_request, workflow_dispatch] +on: pull_request env: HOMEBREW_DEVELOPER: 1 @@ -7,29 +7,16 @@ env: HOMEBREW_NO_AUTO_UPDATE: 1 jobs: - record_pull_number: - if: github.event_name == 'pull_request' + outside_container: runs-on: ubuntu-latest steps: - name: Show `GITHUB_ variables`. run: | printf '```\n' >> "$GITHUB_STEP_SUMMARY" - printf '%s\n' "$(env | grep -E '^GITHUB_')" | tee -a "$GITHUB_STEP_SUMMARY" + printf '%s\n' "$(env | grep -E '^GITHUB_' | sort)" | tee -a "$GITHUB_STEP_SUMMARY" printf '```\n' >> "$GITHUB_STEP_SUMMARY" - - name: Save pull request number - env: - PR: ${{github.event.number}} - run: | - mkdir -p pr - echo "$PR" > pr/number - - - uses: actions/upload-artifact@v3 - with: - name: pull-number - path: pr - - tests: + inside_container: name: Miscellaneous `brew` tests runs-on: ubuntu-latest container: @@ -43,5 +30,5 @@ jobs: - name: Show `GITHUB_ variables`. run: | printf '```\n' >> "$GITHUB_STEP_SUMMARY" - printf '%s\n' "$(env | grep -E '^GITHUB_')" | tee -a "$GITHUB_STEP_SUMMARY" + printf '%s\n' "$(env | grep -E '^GITHUB_' | sort)" | tee -a "$GITHUB_STEP_SUMMARY" printf '```\n' >> "$GITHUB_STEP_SUMMARY"