-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from hellofresh/node-20-build
Make action compatible with node 20
- Loading branch information
Showing
6 changed files
with
30,157 additions
and
8,137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,29 @@ | ||
# action-compile-job-status | ||
GitHub Action compiling all job status of a workflow run | ||
|
||
# Usage | ||
You can use branch protection rules in GitHub pull requests to require specific status checks to pass before merging a pull request. In more complex workflows, especially if you have different workflow files to perform different jobs, you might want to require a specific status check that might not run for every PR, making it impossible to define a required status check. | ||
|
||
Example workflow with dynamic jobs | ||
```yaml | ||
name: Clusters | ||
With this action, you can consolidate workflow results in a single PR status check, making it possible to define a required check. | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
# Usage | ||
|
||
```yaml | ||
jobs: | ||
changed-directories: | ||
name: Generate job matrix | ||
runs-on: [ self-hosted, default ] | ||
outputs: | ||
matrix-eks: ${{ steps.set-matrix-eks.outputs.matrix }} | ||
eks-terraform: | ||
name: EKS Terraform | ||
needs: [ changed-directories ] | ||
runs-on: [ self-hosted, default ] | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.changed-directories.outputs.matrix-eks) }} | ||
if: ${{ fromJson(needs.changed-directories.outputs.matrix-eks).include[0] }} | ||
steps: | ||
- name: Run terraform | ||
uses: ./.github/actions/terraform | ||
with: | ||
dir: eks/${{ matrix.environment }} | ||
command: plan | ||
|
||
# Example use | ||
# Job to compile status from all jobs and set context | ||
compile: | ||
name: compile-status | ||
needs: [ namespace ] | ||
runs-on: [ self-hosted, default ] | ||
steps: | ||
|
||
- uses: hellofresh/[email protected] | ||
# Explicit permissions required for the action | ||
# Can be omitted if default permission for GITHUB_TOKEN in the organization/repository level are set in permissive mode | ||
# | ||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | ||
|
||
permissions: | ||
checks: write | ||
actions: read | ||
|
||
steps: | ||
- uses: hellofresh/action-compile-job-status@v2 | ||
with: | ||
check-run-name: ci-checks | ||
check-run-title: Required check | ||
ignore-jobs: ".*Best-practice|Report|compile*" | ||
check-run-title: Title | ||
``` | ||
## Reference | ||
| | | | | | | ||
|--- |--- |--- |--- |--- | | ||
| | | | | | | ||
| | | | | | | ||
| | | | | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.