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

ci: Run dev.yml, sterile.yml workflows on pull_request #76

Merged
merged 2 commits into from
Nov 12, 2024
Merged
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
7 changes: 6 additions & 1 deletion .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Check for Cargo dependencies updates, and automatically open a Pull Request
# if updates are found.

name: "bump.yml"

on:
workflow_dispatch:
inputs:
Expand All @@ -19,9 +23,10 @@ concurrency:

permissions:
contents: "write"
pull-requests: "write"
packages: "read"
id-token: "write"
pull-requests: "write"

jobs:
update:
runs-on: "ubuntu-latest"
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
# Production artifacts are produced in a sterile environment (in another CI workflow).

name: "dev.yml"

on:
pull_request: {}
push:
branches:
- "main"
merge_group:
workflow_dispatch:
inputs:
Expand All @@ -17,10 +22,9 @@ on:
description: "Run with tmate enabled"
required: false
default: false
push: {}

concurrency:
group: "${{ github.workflow }}:${{ github.ref }}"
group: "${{ github.workflow }}:${{ github.event.pull_request.number || github.event.after }}"
cancel-in-progress: true

permissions:
Expand All @@ -31,6 +35,8 @@ permissions:
jobs:
check_changes:
name: "Deduce required tests from code changes"
permissions:
pull-requests: "read"
runs-on: "ubuntu-latest"
outputs:
devfiles: "${{ steps.changes.outputs.devfiles }}"
Expand All @@ -39,7 +45,7 @@ jobs:
if: "${{ !github.event.pull_request }}"
uses: "actions/checkout@v4"
with:
persist-credentials: "true"
persist-credentials: "false"
fetch-depth: "0"
- name: "Check code changes"
uses: "dorny/paths-filter@v3"
Expand Down Expand Up @@ -172,5 +178,3 @@ jobs:
run: |
>&2 echo "A critical step failed!"
exit 1


18 changes: 12 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Build and deploy the dataplane design documentation.
# Publish a new version of the docs for pushes to "main", or deploy a preview
# when the workflow runs for a Pull Request.

name: "docs.yml"

on:
pull_request: {}
push:
branches:
- "main"
merge_group:
workflow_dispatch:
inputs:
debug_enabled:
type: "boolean"
description: "Run the build with tmate debugging enabled"
pull_request: { }
merge_group:
push:
branches:
- "main"
description: "Run with tmate enabled"
required: false
default: false

concurrency:
group: "${{ github.workflow }}:${{ github.event.pull_request.number || github.event.after }}"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mergeability.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Block Pull Request merge (by failing the check) if specific labels are set.

name: Mergeability

on:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/sterile.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# This is a sterile build and test workflow that uses the `dev-env` container image
# to build and test the project in a sterile environment.
# Artifacts produced by this workflow are intended to be used for production.

name: "sterile.yml"

on:
pull_request: {}
push:
branches:
- "main"
merge_group:
workflow_dispatch:
inputs:
Expand All @@ -14,7 +19,7 @@ on:
default: false

concurrency:
group: "${{ github.workflow }}:${{ github.ref }}"
group: "${{ github.workflow }}:${{ github.event.pull_request.number || github.event.after }}"
cancel-in-progress: true

jobs:
Expand All @@ -28,7 +33,7 @@ jobs:
if: "${{ !github.event.pull_request }}"
uses: "actions/checkout@v4"
with:
persist-credentials: "true"
persist-credentials: "false"
fetch-depth: "0"
- name: "Check code changes"
uses: "dorny/paths-filter@v3"
Expand Down Expand Up @@ -240,4 +245,3 @@ jobs:
run: |
>&2 echo "One or more required pushes failed"
exit 1