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

trying to run actions by contributors #109

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
21 changes: 21 additions & 0 deletions .github/workflows/annotate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Annotate checks

on:
workflow_run:
workflows: ["build-2"]
types:
- completed


jobs:
annotate:
if: github.repository_owner == 'scacap'
runs-on: ubuntu-latest
steps:
- name: 'Download artifact'
uses: actions/download-artifact@v3
with:
name: java-reports
- uses: scacap/action-surefire-report@v1
with:
check_name: Example Surefire Test Report
36 changes: 36 additions & 0 deletions .github/workflows/build-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build-2
on:
pull_request:

concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
group: build-2-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-main-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-main-maven-
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'zulu'
- run: cd tests && mvn clean test --batch-mode -Dmaven.test.failure.ignore=true
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: java-reports
path: |
**/surefire-reports/TEST-*.xml
**/failsafe-reports/TEST-*.xml


7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
group: ${{ github.ref }}

permissions: write-all

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
Expand All @@ -28,7 +27,7 @@ jobs:
java-version: 8
distribution: 'zulu'
- run: cd tests && mvn clean test --batch-mode -Dmaven.test.failure.ignore=true
- uses: scacap/action-surefire-report@master
- uses: ./
if: github.ref != 'refs/heads/master'
with:
check_name: Example Surefire Test Report
Expand Down