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/02 19:21:35 UTC

[maven-gh-actions-shared] branch v2-docs updated (01335e7 -> a3c636a)

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a change to branch v2-docs
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git.


 discard 01335e7  Shared action v2 - more examples of configuration
     new a3c636a  Shared action v2 - more examples of configuration

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (01335e7)
            \
             N -- N -- N   refs/heads/v2-docs (a3c636a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md | 2 ++
 1 file changed, 2 insertions(+)

[maven-gh-actions-shared] 01/01: Shared action v2 - more examples of configuration

Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch v2-docs
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git

commit a3c636a69d0a0891343d35a30a5b0303e34d4737
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)