Skip to content

Commit 65e8b2d

Browse files
committed
ci: update workflow
This reverts commit f0fc2c9.
1 parent 1267c5d commit 65e8b2d

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/build-java11.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
jobs:
1515
build:
1616
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
17-
name: "📦 Build and test GeoNetwork"
17+
name: "📦 Build, test and publish on Docker Hub"
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 40
2020
steps:
@@ -42,27 +42,15 @@ jobs:
4242
name: geonetwork.war
4343
path: web/target/geonetwork.war
4444

45-
build-docker:
46-
needs: build
47-
if: github.event_name != 'issue_comment' || needs.checks.outputs.shouldRun
48-
name: "🐳 Build and upload docker images"
49-
runs-on: ubuntu-latest
50-
steps:
5145
- name: Getting image tag
5246
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]'
5347
id: version
5448
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
5549

56-
- name: "Checking out"
57-
uses: actions/checkout@v2.4.0
58-
with:
59-
submodules: 'recursive'
60-
61-
- name: "Build GeoNetwork docker image"
50+
- name: "🐳 Build GeoNetwork docker image"
6251
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]'
6352
run: |
64-
mvn -DskipTests -Pdatahub-integration clean install;
65-
cd geonetwork/web
53+
cd web
6654
mvn package -Pdocker,datahub-integration -DdockerImageName=georchestra/geonetwork -DdockerImageTags=${{ steps.version.outputs.VERSION }},latest -DskipTests -ntp
6755
6856
- name: "Logging in docker.io"
@@ -78,12 +66,7 @@ jobs:
7866
docker push georchestra/geonetwork:latest
7967
8068
- name: "Pushing release branch to docker.io"
81-
if: contains(github.ref, 'refs/heads/24.') && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
82-
run: |
83-
docker push georchestra/geonetwork:${{ steps.version.outputs.VERSION }}
84-
85-
- name: "Pushing release tag to docker.io"
86-
if: contains(github.ref, 'refs/tags/24.') && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
69+
if: (contains(github.ref, 'refs/tags/') || endsWith(github.ref, '.x')) && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
8770
run: |
8871
docker push georchestra/geonetwork:${{ steps.version.outputs.VERSION }}
8972

0 commit comments

Comments
 (0)