Skip to content

Commit

Permalink
feat: build alpha with branch
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Nov 27, 2023
1 parent 856414d commit 65a6e8d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/georchestra-gn4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Building georchestra-geonetwork4 artifacts
on:
push:
branches:
- georchestra-gn4.2.x
- georchestra-gn-4.2.6-build
pull_request:
workflow_dispatch:

env:
DOCKER_TAG: 4.2.x
DOCKER_TAG: 4.2.6-alpha

jobs:
build:
Expand Down Expand Up @@ -62,26 +62,20 @@ jobs:
-DdockerImageName=georchestra/geonetwork:${DOCKER_TAG} -DskipTests
- name: "publish the webapp as artifact"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn-4.2.6-build'
uses: actions/upload-artifact@v1
with:
name: geonetwork.war
path: web/target/geonetwork.war

- name: "Login onto docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn-4.2.6-build'
uses: docker/login-action@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'

- name: "Pushing branch image to docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn-4.2.6-build'
run: |
docker push georchestra/geonetwork:${DOCKER_TAG}
- name: "Pushing latest image to docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
run: |
docker tag georchestra/geonetwork:${DOCKER_TAG} georchestra/geonetwork:latest
docker push georchestra/geonetwork:latest

0 comments on commit 65a6e8d

Please sign in to comment.