Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vladi14 committed Nov 11, 2023
1 parent a9be555 commit 3f5ed78
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ env:
jobs:
build:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.nextVersion.outputs.next_version }}
steps:

- name: repo checkout
uses: actions/checkout@v4

- name: Version increase
- name: Bump Version
id: bump
uses: nnichols/maven-version-bump-action@v3
with:
github-token: ${{ secrets.github_token }}

- name: Print Version
run: "echo 'New Version: ${{steps.bump.outputs.version}}'"

- name: update_version
working-directory: ./myapp
run: |
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
Expand All @@ -31,13 +38,13 @@ jobs:
with:
name: my-artifact
path: ${{ github.workspace }}/myapp/target/*.jar
outputs:
release_version: ${{ steps.update_version.outputs.next_version }}


publish:
runs-on: ubuntu-latest
needs: build
env:
NEXT_VERSION: ${{ needs.build.outputs.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down Expand Up @@ -65,7 +72,7 @@ jobs:
context: .
file: Dockerfile
push: true
tags: vladipiko/app:latest
tags: vladipiko/maven-hello-world:${{ needs.package.outputs.release_version }}


deploy:
Expand All @@ -77,7 +84,8 @@ jobs:
with:
username: ${{ secrets.DOCKER_UNAME }}
password: ${{ secrets.DOCKER_KEY }}

- name: Download and Run Docker Image
run: |
docker pull vladipiko/app:latest
docker run --rm -p 8080:8080 vladipiko/app:latest
docker pull vladipiko/maven-hello-world:latest
docker run --rm -p 8080:8080 vladipiko/maven-hello-world:latest

0 comments on commit 3f5ed78

Please sign in to comment.