Skip to content

Commit

Permalink
♻️ rework github actions for world peace
Browse files Browse the repository at this point in the history
  • Loading branch information
ianardee committed Dec 27, 2024
1 parent fecf2e2 commit 05e9bcc
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 79 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Tests

on:
- push
workflow_call:

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Check Style

on:
- push
workflow_call:

jobs:
check-style:
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/codeql.yml → .github/workflows/_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '33 17 * * 1'
workflow_call:
workflow_dispatch:

jobs:
analyze:
Expand Down Expand Up @@ -69,6 +64,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
5 changes: 1 addition & 4 deletions .github/workflows/docs.yml → .github/workflows/_docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Publish Documentation

on:
release:
types: [ published ]

# Allows running this workflow manually from the Actions tab
workflow_call:
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Integration Tests

on:
pull_request:
schedule:
- cron: '0 23 * * *'
workflow_call:
workflow_dispatch:

jobs:
integration_tests:
name: Run Integration Tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Publish package to the Maven Central Repository
name: Publish to Maven Central

on:
release:
types: [ published ]

# Allows running this workflow manually from the Actions tab
workflow_call:
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Sync `documentation` directory to ReadMe
name: Sync documentation to ReadMe

# Run workflow for every push to the `main` branch
on:
release:
branches:
- main
workflow_call:
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Test Samples Java Classes
name: Test Code Samples
on:
pull_request:
schedule:
- cron: '0 23 * * *'

# Allows to run this workflow manually from the Actions tab
workflow_call:
workflow_dispatch:

jobs:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Crontab

on:
schedule:
- cron: '33 0 * * *'

jobs:
codeql:
uses: mindee/mindee-api-java/.github/workflows/_codeql.yml@new-actions
test_code_samples:
uses: mindee/mindee-api-java/.github/workflows/_test-code-samples.yml@new-actions
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Publish Release

on:
release:
types: [ published ]

jobs:
docs-publish:
uses: mindee/mindee-api-java/.github/workflows/_docs.yml@main
secrets: inherit
maven-publish:
uses: mindee/mindee-api-java/.github/workflows/_maven-publish.yml@main
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pull Request

on:
pull_request:

jobs:
checkstyle:
uses: mindee/mindee-api-java/.github/workflows/_checkstyle.yml@new-actions
build:
uses: mindee/mindee-api-java/.github/workflows/_build.yml@new-actions
needs: checkstyle
secrets: inherit
codeql:
uses: mindee/mindee-api-java/.github/workflows/_codeql.yml@new-actions
needs: build
integration_tests:
uses: mindee/mindee-api-java/.github/workflows/_integration-tests.yml@new-actions
needs: build
secrets: inherit
test_code_samples:
uses: mindee/mindee-api-java/.github/workflows/_test-code-samples.yml@new-actions
needs: build
secrets: inherit
24 changes: 24 additions & 0 deletions .github/workflows/push-main-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Push Main Branch

on:
push:
branches:
- main

jobs:
checkstyle:
uses: mindee/mindee-api-java/.github/workflows/_checkstyle.yml@main
build:
uses: mindee/mindee-api-java/.github/workflows/_build.yml@main
needs: checkstyle
secrets: inherit
codeql:
uses: mindee/mindee-api-java/.github/workflows/codeql.yml@main
needs: build
sync-readme:
uses: mindee/mindee-api-java/.github/workflows/_sync-md.yml@main
needs: codeql
secrets: inherit
tag:
uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main
needs: codeql
46 changes: 0 additions & 46 deletions .github/workflows/tag-version.yml

This file was deleted.

0 comments on commit 05e9bcc

Please sign in to comment.