Skip to content

Commit

Permalink
run only on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed Apr 28, 2023
1 parent e297571 commit 7574f30
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
name: CI
on: [push, pull_request, workflow_dispatch]
on: pull_request

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_INSTALL_FROM_API: 1
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:
Expand All @@ -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"

0 comments on commit 7574f30

Please sign in to comment.