Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zalimeni/actual skippable #633

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/630.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-notes:bug
changelog
```
41 changes: 35 additions & 6 deletions .github/workflows/reusable-conditional-skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,49 @@ on:
outputs:
skip-ci:
description: "Whether we should skip build and test jobs"
value: ${{ jobs.check-skip.outputs.skip-ci }}
value: ${{ jobs.maybe-skip-ci.outputs.skip-ci }}

jobs:
check-skip:
runs-on: ubuntu-latest
name: Check whether to skip build and tests
outputs:
skip-ci: ${{ steps.check-changed-files.outputs.skip-ci }}
env:
SKIP_CHECK_BRANCH: ${{ github.head_ref || github.ref_name }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: Check changed files
id: check-changed-files
run: ./.github/scripts/check_skip_ci.sh
- name: Debug - show commits
run: |
git log -n3 --pretty=oneline
echo "event_name: ${{ github.event_name }}"
echo "base_ref: ${{ github.base_ref }}"
echo "head_ref: ${{ github.head_ref }}"
echo "ref: ${{ github.ref }}"
- name: Check for skippable file changes
id: changed-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: false
base_sha: ${{ github.base_ref || github.ref }}
files: |
.github/workflows/reusable-conditional-skip.yml
**.md
_doc/**
.changelog/**
- name: Print changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
NON_SKIPPABLE_FILES: ${{ steps.changed-files.outputs.other_changed_files }}
run: |
echo "All changed on PR merge branch:"
for file in ${ALL_CHANGED_FILES}; do echo " $file"; done
echo
echo "Non-skippable files changed on PR merge branch:"
for file in ${NON_SKIPPABLE_FILES}; do echo " $file"; done
- name: Skip tests and build if only skippable files changed
id: maybe-skip-ci
if: ${{ steps.changed-files.outputs.only_changed == 'true' }}
run: |
echo "Skipping tests and build because only skippable files changed"
echo "skip-ci=true" >> "$GITHUB_OUTPUT"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<span>Consul Dataplane</span>
</h1>

Test doc change

Consul Dataplane is a lightweight process that manages Envoy for Consul service mesh workloads.

Consul Dataplane's design removes the need to run Consul client agents. Removing Consul client
Expand Down
Loading