Skip to content

Commit

Permalink
tweak GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyDumaine committed Dec 18, 2024
1 parent 9a40037 commit a24849c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/build_test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ jobs:
include:
- flavor: ${{ github.ref == 'refs/heads/main' && 'all' || 'quick' }}
uses: ./.github/workflows/e2e-test.yaml
if: ${{contains(fromJSON(needs.changes.outputs.paths), 'src')}}
secrets: inherit
with:
e2e-selector: ${{ matrix.flavor }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,29 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'src' output variable
paths: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- uses: dorny/paths-filter@v3
id: filter
with:
filters: .github/filters.yml
e2e-test:
needs: changes
name: ${{ format('{0}-e2e-tests', inputs.e2e-selector) }}
if: ${{contains(fromJSON(needs.changes.outputs.paths), 'src')}}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
Expand Down

0 comments on commit a24849c

Please sign in to comment.