|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License |
| 17 | +name: "Push to DockerHub" |
| 18 | + |
| 19 | +on: |
| 20 | + push: |
| 21 | + branches: ['master'] |
| 22 | + |
| 23 | +jobs: |
| 24 | + neo4j: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Checkout repository |
| 29 | + uses: actions/checkout@v4 |
| 30 | + - name: Setup Java JDK |
| 31 | + uses: actions/setup-java@v4 |
| 32 | + with: |
| 33 | + distribution: 'temurin' |
| 34 | + java-version: 21 |
| 35 | + - name: Setup Maven |
| 36 | + uses: stCarolas/setup-maven@v5 |
| 37 | + with: |
| 38 | + maven-version: 3.9.6 |
| 39 | + - uses: actions/cache@v4 |
| 40 | + with: |
| 41 | + path: ~/.m2/repository |
| 42 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 43 | + restore-keys: | |
| 44 | + ${{ runner.os }}-maven- |
| 45 | + - name: Build |
| 46 | + run: mvn -U -T 1C -P 'skipTests,all,docker' |
| 47 | + - name: 'Push to DockerHub' |
| 48 | + run: mvn -f docker/pom.xml docker:push -Ddocker.username=${{secrets.DOCKERHUB_USER}} -Ddocker.password=${{secrets.DOCKERHUB_TOKEN}} |
0 commit comments