Skip to content

Commit

Permalink
Create a publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
anosh-ar authored Jun 6, 2024
1 parent a069781 commit bd4d9f2
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ jobs:

- name: Build with Gradle
run: ./gradlew build

- name: Build & push Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: anoshrz/java_project
tags: v1, latest
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
publish:
runs-on: ubuntu-latest
needs: build

steps:
- name: Build & push Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: anoshrz/java_project
tags: latest
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
#
Expand Down

0 comments on commit bd4d9f2

Please sign in to comment.