You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/01/04 07:59:32 UTC
[maven-gh-actions-shared] branch main updated: Shared action v2 - more examples of configuration
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
The following commit(s) were added to refs/heads/main by this push:
new 89109af Shared action v2 - more examples of configuration
89109af is described below
commit 89109af592ee577268b0e1cf333a927640fd16ba
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun Jan 2 20:17:32 2022 +0100
Shared action v2 - more examples of configuration
---
README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 45 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 90f31c6..34e3863 100644
--- a/README.md
+++ b/README.md
@@ -49,22 +49,46 @@ name: Verify
on:
push:
- branches-ignore:
- - dependabot/**
pull_request:
jobs:
build:
name: Verify
- uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
+ uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2
```
+## Events that can trigger workflows
-Excludes from build matrix:
+In such configuration workflow can be executed in the same time twice for two separate events.
+
+It can occurs when we create PR for branch from the same repository, we have two events:
+- `push` on branch
+- `pull_request` on PR for the same branch
+
+In order to minimize resource consumptions shared workflow from version `v2`
+detect such situation and skips the execution for `pull_request` event
+if `PR` is created for local branch.
+
+Only workflow for PR from external forks will be executed.
+
+# Additional configurations
+
+## Attach logs on failure
+
+We can store some logs of execution in case of failure as workflow attachments:
+
+```yaml
+...
+ uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2
+ with:
+ failure-upload-path: |
+ **/target/surefire-reports/*
+```
+## Excludes from build matrix:
```yaml
...
- uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
+ uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2
with:
matrix-exclude: >
[
@@ -74,6 +98,22 @@ Excludes from build matrix:
]
```
+## Change default goals
+
+```yaml
+...
+ uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2
+ with:
+ ff-goal: 'install'
+ verify-goal: 'install -P run-its'
+```
+
+## More options
+
+More options with default values can be found in workflow source in `inputs` section:
+
+https://github.com/apache/maven-gh-actions-shared/blob/v2/.github/workflows/maven-verify.yml
+
# Resources
- [Workflow syntax](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions)