Skip to content

Commit 6d09ddf

Browse files
authored
ci: workflow update (#239)
1 parent b520587 commit 6d09ddf

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/maven-build.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
name: maven-build
33
on:
44
push:
5-
branches: ['**/**']
5+
branches: ['**']
66
pull_request:
77
branches: [main]
88
types: [opened, synchronize, reopened, ready_for_review]
9+
workflow_dispatch:
910
jobs:
1011
build:
1112
runs-on: ubuntu-latest
@@ -20,11 +21,11 @@ jobs:
2021
MARKDOWN2HTML_MAVEN_PLUGIN_FAIL_ON_ERROR: true
2122
steps:
2223
- name: 📄 Checkout the repository
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2425
with:
2526
fetch-depth: 0
2627
- name: 🧱 Set up JDK and Maven
27-
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
28+
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
2829
with:
2930
distribution: adopt
3031
java-version: 17
@@ -37,7 +38,7 @@ jobs:
3738
run: echo "cache_key=${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}" >> $GITHUB_OUTPUT
3839
- name: 💾 Prepare cache using cache key
3940
id: prepare-cache
40-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
41+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
4142
with:
4243
path: |
4344
/home/runner/.m2
@@ -115,14 +116,14 @@ jobs:
115116
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE }}
116117
steps:
117118
- name: 🧱 Set up JDK and Maven
118-
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
119+
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
119120
with:
120121
distribution: adopt
121122
java-version: 17
122123
gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }}
123124
- name: 💾 Restore cache using cache key
124125
id: restore-cache
125-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
126+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
126127
with:
127128
path: |
128129
/home/runner/.m2
@@ -131,7 +132,7 @@ jobs:
131132
- name: 📦 Deploy artifacts to Maven Central
132133
run: mvn --batch-mode deploy -P gpg-sign -P nexus-staging
133134

134-
# Deploy release to GitHub Packages
135+
# Deploy releases for main branch to GitHub Packages
135136
deploy-github-packages:
136137
needs: build
137138
runs-on: ubuntu-latest
@@ -145,13 +146,13 @@ jobs:
145146
GITHUB_TOKEN: ${{ github.token }}
146147
steps:
147148
- name: 🧱 Set up JDK and Maven
148-
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
149+
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
149150
with:
150151
distribution: adopt
151152
java-version: 17
152153
- name: 💾 Restore cache using cache key
153154
id: restore-cache
154-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
155+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
155156
with:
156157
path: |
157158
/home/runner/.m2

.github/workflows/pr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
name: Check commit messages
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1414
with:
1515
ref: ${{ github.event.pull_request.head.ref }}
1616
repository: ${{ github.event.pull_request.head.repo.full_name }}
1717
fetch-depth: 0
18-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
18+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
1919
with:
2020
python-version: 3.x
2121
- run: pip install commitizen

.github/workflows/release-please.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: release-please
33
on:
44
push:
55
branches: [main]
6+
workflow_dispatch:
67
permissions:
78
contents: write
89
pull-requests: write
@@ -12,7 +13,7 @@ jobs:
1213
steps:
1314
- name: release-please
1415
id: release
15-
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
16+
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
1617
with:
1718
release-type: maven
1819
target-branch: main

0 commit comments

Comments
 (0)