File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 deployment :
1414 name : Deploy artifacts
1515 runs-on : ubuntu-latest
16- environment :
17- name : ${{ matrix.envName }}
16+ permissions :
17+ deployments : write
1818 strategy :
1919 matrix :
2020 envName : ["Development", "Production"]
4141 gpg-private-key : ${{ secrets.GPG_SIGNING_KEY }}
4242 gpg-passphrase : MAVEN_GPG_PASSPHRASE
4343
44+ - name : Create GitHub deployment
45+ uses : chrnorm/deployment-action@v2
46+ id : deployment
47+ with :
48+ token : ${{ github.token }}
49+ environment : ${{ matrix.envName }}
50+
4451 - name : Build the code with Maven
4552 run : mvn -B -ntp install -Pci
4653
5259 MAVEN_REPO_TOKEN : ${{ secrets.SONATYPE_TOKEN }}
5360 MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
5461
62+ - name : Update deployment status (success)
63+ if : success()
64+ uses : chrnorm/deployment-status@v2
65+ with :
66+ token : ${{ github.token }}
67+ state : ' success'
68+ deployment-id : ${{ steps.deployment.outputs.deployment_id }}
69+
70+ - name : Update deployment status (failure)
71+ if : failure()
72+ uses : chrnorm/deployment-status@v2
73+ with :
74+ token : ${{ github.token }}
75+ state : ' failure'
76+ deployment-id : ${{ steps.deployment.outputs.deployment_id }}
77+
5578 - name : Sonar Analysis
5679 if : ${{ github.actor != 'dependabot[bot]' }}
5780 run : mvn sonar:sonar -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}
You can’t perform that action at this time.
0 commit comments