Skip to content

Commit

Permalink
Update deployment workflow configuration
Browse files Browse the repository at this point in the history
Removed the development branch from the trigger and added a condition in the 'Maven package' GitHub Actions step. This adjustment ensures the username and password for Docker Hub are only included in the command during packaging when the deployment is not on the development branch.
  • Loading branch information
MichiBaum committed Jul 19, 2024
1 parent a3eb5b3 commit 600c723
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build and Publish

# TODO Remove develop
on:
push:
branches:
Expand Down Expand Up @@ -31,9 +30,10 @@ jobs:
- name: Angular build
run: npm run --prefix website build-production

# - name: Generate Javadoc
# run: mvn javadoc:aggregate

- name: Maven package
# Windows: ./mvnw compile jib:build "-DdockerHub.username=${{secrets.DOCKER_USERNAME}}" "-DdockerHub.password=${{secrets.DOCKER_PASSWORD}}"
run: mvn package -DdockerHub.username=${{secrets.DOCKER_USERNAME}} -DdockerHub.password=${{secrets.DOCKER_PASSWORD}}
run: |
if [[ "${{github.ref}}" == "refs/heads/develop" ]]; then
mvn package
else
mvn package -DdockerHub.username=${{secrets.DOCKER_USERNAME}} -DdockerHub.password=${{secrets.DOCKER_PASSWORD}}
fi

0 comments on commit 600c723

Please sign in to comment.