Skip to content

Commit b05c2bc

Browse files
committed
Update Fix Workflows
1 parent 039dfdb commit b05c2bc

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

.github/workflows/ci-sonar.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
with:
2525
distribution: 'temurin'
2626
java-version: '21'
27-
cache: 'maven'
27+
cache: maven
28+
server-id: github
29+
settings-path: ${{ github.workspace }}
30+
token: ${{ secrets.GITHUB_TOKEN }}
2831

2932
- name: Build & Test
3033
run: mvn -B -DskipTests=false -Dmaven.test.failure.ignore=true verify
@@ -54,6 +57,16 @@ jobs:
5457
run: |
5558
mvn -B -DskipTests=true -s $GITHUB_WORKSPACE/settings.xml deploy
5659
60+
- name: Publish to GitHub Packages
61+
if: startsWith(github.ref, 'refs/tags/v')
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: |
65+
# actions/setup-java (bên trên) đã tạo sẵn serverId=github dùng GITHUB_TOKEN
66+
mvn -B -DskipTests=true \
67+
-DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }} \
68+
deploy
69+
5770
- name: SonarQube / SonarCloud Scan
5871
env:
5972
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}

.idea/compiler.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@
113113
</dependencies>
114114
</dependencyManagement>
115115

116-
<distributionManagement>
117-
<repository>
118-
<id>github</id>
119-
<name>GitHub Packages</name>
120-
<url>https://maven.pkg.github.com/${project.groupId}/${project.artifactId}</url>
121-
</repository>
122-
</distributionManagement>
123-
124116
<!-- Quản lý version plugin dùng chung -->
125117
<build>
126118
<pluginManagement>

0 commit comments

Comments
 (0)