Skip to content

Commit

Permalink
[actions] update sandpaper workflow to version 0.11.8
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar authored Mar 14, 2023
1 parent 0fb08e8 commit 838dd8d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ pull request. GitHub has safeguarded the token used in this workflow to have no
priviledges in the repository, but we have taken precautions to protect against
spoofing.

This workflow is triggered with every push to a pull request. If this workflow
is already running and a new push is sent to the pull request, the workflow
running from the previous push will be cancelled and a new workflow run will be
started.

The first step of this workflow is to check if it is valid (e.g. that no
workflow files have been modified). If there are workflow files that have been
modified, a comment is made that indicates that the workflow is not run. If
Expand All @@ -160,7 +165,7 @@ request. This builds the content and uploads three artifacts:
3. The rendered files (build)

Because this workflow builds generated content, it follows the same general
process as the sandpaper-main workflow with the same caching mechanisms.
process as the `sandpaper-main` workflow with the same caching mechanisms.

The artifacts produced are used by the next workflow.

Expand All @@ -176,7 +181,7 @@ The steps in this workflow are:
3. If it is valid: update the pull request comment with the summary of changes

Importantly: if the pull request is invalid, the branch is not created so any
malicious code is not published.
malicious code is not published.

From here, the maintainer can request changes from the author and eventually
either merge or reject the PR. When this happens, if the PR was valid, the
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
types:
- completed

concurrency:
group: pr-${{ github.event.workflow_run.pull_requests[0].number }}
cancel-in-progress: true


jobs:
# Pull requests are valid if:
# - they match the sha of the workflow run head commit
Expand Down Expand Up @@ -58,6 +63,7 @@ jobs:
with:
pr: ${{ steps.get-pr.outputs.NUM }}
sha: ${{ github.event.workflow_run.head_sha }}
headroom: 3 # if it's within the last three commits, we can keep going, because it's likely rapid-fire
invalid: ${{ fromJSON(steps.hash.outputs.json)[github.repository] }}
fail_on_error: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr-receive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types:
[opened, synchronize, reopened]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
test-pr:
name: "Record PR number"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sandpaper-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.8
0.11.8

0 comments on commit 838dd8d

Please sign in to comment.