3838
3939jobs :
4040 prepare-code-to-analyze :
41+ name : Prepare Code to Analyze
4142 runs-on : ubuntu-latest
42- outputs :
43- analysis-name : ${{ steps.set-analysis-name.outputs.analysis-name }}
44- sources-upload-name : ${{ steps.set-sources-upload-name.outputs.sources-upload-name }}
45- artifacts-upload-name : ${{ steps.set-artifacts-upload-name.outputs.artifacts-upload-name }}
46-
4743 env :
4844 PROJECT_NAME : AxonFramework
4945 # Version variable names matches renovate.json configuration entry
5046 AXON_FRAMEWORK_VERSION : 4.10.3
5147 # Java is in this example only used to download JARs for analysis using Maven
5248 JAVA_VERSION : 21
49+ outputs :
50+ project-name : ${{ env.PROJECT_NAME }}
51+ analysis-name : ${{ steps.set-analysis-name.outputs.analysis-name }}
52+ sources-upload-name : ${{ steps.set-sources-upload-name.outputs.sources-upload-name }}
53+ artifacts-upload-name : ${{ steps.set-artifacts-upload-name.outputs.artifacts-upload-name }}
5354
5455 steps :
5556 - name : (Prepare Code to Analyze) Checkout AxonFramework repository
@@ -113,6 +114,7 @@ jobs:
113114
114115
115116 analyze-code-graph :
117+ name : Analyze Code Graph
116118 needs : [prepare-code-to-analyze]
117119 uses : JohT/code-graph-analysis-pipeline/.github/workflows/public-analyze-code-graph.yml@7f43cf96d676f715cf278b020ce1dbb3338f900b # v2
118120 with :
@@ -122,49 +124,15 @@ jobs:
122124 ref : 7f43cf96d676f715cf278b020ce1dbb3338f900b
123125
124126
125- analysis-results :
127+ commit-analysis-results :
128+ name : Commit Analysis Results
126129 needs : [prepare-code-to-analyze, analyze-code-graph]
127- runs-on : ubuntu-latest
128-
129- env :
130- CI_COMMIT_MESSAGE : Automated code structure analysis analysis-results (CI)
131- CI_COMMIT_AUTHOR : ${{ github.event.repository.name }} Continuous Integration
132-
133- steps :
134- - name : Checkout GIT Repository
135- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
136- with :
137- token : ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
138-
139- - name : Download source code and artifacts for analysis
140- uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
141- with :
142- name : ${{ needs.analyze-code-graph.outputs.uploaded-analysis-results }}
143- path : analysis-results/${{ needs.prepare-code-to-analyze.outputs.analysis-name }}
144-
145- # Commit and push the native image agent analysis-results
146- - name : Display environment variable "github.event_name"
147- run : echo "github.event_name=${{ github.event_name }}"
148- - name : Display changes in the "analysis-results" directory and prepare commit
149- # Only run when a pull request gets merged or a commit is pushed to the main branch
150- # git add parameters need to match paths-ignore parameters above
151- # Git pull before add/commit/push to reduce race conditions on parallel builds
152- run : |
153- git config --global user.name '${{ env.CI_COMMIT_AUTHOR }}'
154- git config --global user.email "[email protected] " 155- git config --local http.postBuffer 524288000
156- git fetch origin
157- git status
158- git add analysis-results
159- git status
160- - name : Commit and push changes in the "analysis-results" directory
161- # Only run when a pull request gets merged or a commit is pushed to the main branch
162- # git add parameters need to match paths-ignore parameters above
163- # Git pull before add/commit/push to reduce race conditions on parallel builds
164- if : github.event_name == 'push'
165- run : |
166- git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
167- git status
168- git rebase --strategy-option=theirs origin/main --verbose
169- git status
170- git push --verbose
130+ uses : ./.github/workflows/internal-commit-results.yml
131+ with :
132+ commit-author-name : " ${{ github.event.repository.name }} Continuous Integration"
133+ commit-author-email :
" [email protected] " 134+ commit-message : " Automated code structure analysis results (CI)"
135+ commit-directory : " analysis-results/${{ needs.prepare-code-to-analyze.outputs.project-name }}/${{ needs.prepare-code-to-analyze.outputs.analysis-name }}"
136+ uploaded-artifact-name : ${{ needs.analyze-code-graph.outputs.uploaded-analysis-results }}
137+ secrets :
138+ repository-commit-token : ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
0 commit comments