only run actions on /src changes (#750)
## Description Re-opening the PR with a hack (sourced from github themselves) to skip the required check if we don't run the standard required jobs. ## Type of change - [x] 🌻 Feature ## Issue(s) #744 ## Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
0227bba7ac
commit
1f8c3cdb11
30
.github/workflows/ci-skip.yml
vendored
Normal file
30
.github/workflows/ci-skip.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: CI Tests
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
|
||||
# Intentional no-op used to tell the build system that
|
||||
# required actions like Test-Suite and Linting have passed
|
||||
# successfully, even though they were skipped.
|
||||
|
||||
# This hack brought to you by docs.github.com
|
||||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
|
||||
jobs:
|
||||
Test-Suite:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "Build step skipped - no testing required" '
|
||||
|
||||
Linting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "Build step skipped - no linting required" '
|
||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -2,13 +2,18 @@ name: CI Tests
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
|
||||
permissions:
|
||||
# required to retrieve AWS credentials
|
||||
id-token: write
|
||||
# required to retrieve repository
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
@ -19,7 +24,8 @@ jobs:
|
||||
run:
|
||||
working-directory: src
|
||||
steps:
|
||||
- name: Repo Code Checkout
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Get values for cache paths to be used in later steps
|
||||
|
||||
5
.github/workflows/docgen.yml
vendored
5
.github/workflows/docgen.yml
vendored
@ -2,6 +2,9 @@ name: Document Generation
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@ -13,12 +16,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
# check out the repo
|
||||
- name: Repo Code Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
# persist-credentials: false
|
||||
|
||||
# Get values for cache paths to be used in later steps
|
||||
- id: go-cache-paths
|
||||
|
||||
4
.github/workflows/image.yml
vendored
4
.github/workflows/image.yml
vendored
@ -2,6 +2,9 @@ name: Publish Docker Container Images
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@ -16,6 +19,7 @@ jobs:
|
||||
env:
|
||||
PLATFORMS: linux/amd64,linux/arm64
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
||||
12
.github/workflows/lint.yml
vendored
12
.github/workflows/lint.yml
vendored
@ -2,8 +2,17 @@ name: Lint
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '/src/**'
|
||||
- '/.github/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
Linting:
|
||||
@ -13,7 +22,8 @@ jobs:
|
||||
run:
|
||||
working-directory: src
|
||||
steps:
|
||||
- name: Checkout src code
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Get values for cache paths to be used in later steps
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user