Skip to content

Commit

Permalink
workflows: remove ignored parameter
Browse files Browse the repository at this point in the history
As documented here:
https://github.com/dorny/paths-filter/blob/78ab00f87740f82aec8ed8826eb4c3c851044126/action.yml

> This option is ignored if action is triggered by pull_request event.

As for `${{ github.event.before }}`, it is undeeded for push events to `master`:

> Defaults to repository default branch (e.g. master).

They actually create a warning in GitHub actions, so I propose removing
it.

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
  • Loading branch information
nbusseneau authored and nathanjsweet committed Jun 2, 2021
1 parent 5ae34dd commit 652da82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint-bpf-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
uses: dorny/paths-filter@78ab00f87740f82aec8ed8826eb4c3c851044126
id: changes
with:
base: ${{ github.event.pull_request.base.sha || github.event.before }}
filters: |
bpf-tree:
- 'bpf/**'
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/lint-build-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ jobs:
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8
with:
go-version: 1.16.4

- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
with:
path: $HOME/.clang
key: llvm-10.0

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@d0970114d0f720f5eb6a91b9e33cc2699f469f37
with:
version: "10.0"
directory: $HOME/.clang
cached: ${{ steps.cache-llvm.outputs.cache-hit }}

- name: Install libelf
run: |
sudo apt-get install libelf-dev
- name: Checkout code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Check if build works for every commit
run: |
PR_COMMITS_API_JSON=$(curl \
Expand All @@ -62,7 +62,6 @@ jobs:
uses: dorny/paths-filter@78ab00f87740f82aec8ed8826eb4c3c851044126
id: bpf-tree
with:
base: ${{ github.event.pull_request.base.sha }}
filters: |
src:
- 'bpf/**'
Expand All @@ -78,11 +77,11 @@ jobs:
PR_FIRST_SHA=$(echo "$PR_COMMITS_API_JSON" | jq -r ".[0].sha")
PR_PARENT_SHA=$(git rev-parse "${PR_FIRST_SHA}^")
git rebase --exec "make -C bpf build_all -j $(nproc)" $PR_PARENT_SHA
- name: Failed commit during the build
if: ${{ failure() }}
run: git --no-pager log --format=%B -n 1

- name: Send slack notification
if: ${{ (cancelled() || failure()) && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@dcc8c8e9dd8802e21a712dc0c003db97b42efe43
Expand Down

0 comments on commit 652da82

Please sign in to comment.