Skip to content

Commit 2b2f8bd

Browse files
committed
fix: gh action fetch depth for proper tag version.
1 parent 6c0501a commit 2b2f8bd

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ defaults:
2929
shell: bash
3030

3131
jobs:
32+
33+
# Gradle Build Action
34+
# -------------------
35+
3236
build:
3337
name: 🏗️ Gradle Build
3438
timeout-minutes: 15
@@ -58,7 +62,7 @@ jobs:
5862
- name: 🛎️ Check out the source code
5963
uses: actions/checkout@v2
6064
with:
61-
fetch-depth: 100
65+
fetch-depth: 0
6266

6367
- name: ⬇️ Download ${{ matrix.os }} OpenJDK ${{ matrix.jdk }}
6468
id: download-jdk
@@ -118,8 +122,9 @@ jobs:
118122
${{ steps.gradle-build.outputs.uberjar_path }}
119123
if-no-files-found: error
120124

125+
# Deploy the Dokka site for new tag on Linux
121126
- name: 🚀 Deploy html docs to website
122-
if: runner.os == 'Linux'
127+
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux'
123128
uses: JamesIves/github-pages-deploy-action@releases/v3
124129
with:
125130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -128,6 +133,9 @@ jobs:
128133
TARGET_FOLDER: docs/apidoc/
129134
CLEAN: true
130135

136+
# Github Release Action on tag push
137+
# ---------------------------------
138+
131139
release:
132140
name: 🚰 Release new version.
133141
needs: [ build ]
@@ -166,6 +174,10 @@ jobs:
166174
env:
167175
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168176

177+
178+
# Run Java Application on OpenJDK docker/oci images
179+
# -------------------------------------------------
180+
169181
container-build:
170182
name: 🚢 Run Java on Container
171183
runs-on: ubuntu-latest
@@ -180,7 +192,6 @@ jobs:
180192
shell: sh
181193

182194
container:
183-
# openjdk:17-jdk-alpine
184195
image: ${{ matrix.jdk }}
185196

186197
steps:

0 commit comments

Comments
 (0)