Skip to content

Commit

Permalink
update cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Apr 3, 2024
1 parent 1d2ec88 commit 707fe63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ jobs:
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
- name: Test code
uses: noi-techpark/github-actions/maven-test@v2
uses: noi-techpark/github-actions/maven-test@v3
with:
java-version: ${{ env.JAVA_VERSION }}
test-command: 'mvn -B test'

# Deploy Test
deploy-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
needs: test
concurrency: deploy-test
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Create .env file
uses: noi-techpark/github-actions/env-file@v2
uses: noi-techpark/github-actions/env-file@v3
env:
X_COMPOSE_PROJECT_NAME: ${{ env.PROJECT_NAME }}
X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
Expand Down Expand Up @@ -77,13 +77,13 @@ jobs:
X_HIBERNATE_SQL_LOG: "false"

- name: Build project
uses: noi-techpark/github-actions/maven-build@v2
uses: noi-techpark/github-actions/maven-build@v3
with:
java-version: ${{ env.JAVA_VERSION }}
build-command: 'mvn -B -DskipTests -DfinalName=bdp --projects writer --also-make clean package'

- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
uses: noi-techpark/github-actions/docker-build-and-push@v3
with:
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -99,7 +99,7 @@ jobs:
unstable
- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
uses: noi-techpark/github-actions/docker-deploy@v3
with:
hosts: 'test'
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
Expand All @@ -109,15 +109,15 @@ jobs:

# Deploy Prod
deploy-prod:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/prod'
needs: test
concurrency: deploy-prod
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Create .env file
uses: noi-techpark/github-actions/env-file@v2
uses: noi-techpark/github-actions/env-file@v3
env:
X_COMPOSE_PROJECT_NAME: ${{ env.PROJECT_NAME }}
X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
Expand Down Expand Up @@ -150,13 +150,13 @@ jobs:
X_HIBERNATE_SQL_LOG: "false"

- name: Build project
uses: noi-techpark/github-actions/maven-build@v2
uses: noi-techpark/github-actions/maven-build@v3
with:
java-version: ${{ env.JAVA_VERSION }}
build-command: 'mvn -B -DskipTests -DfinalName=bdp --projects writer --also-make clean package'

- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
uses: noi-techpark/github-actions/docker-build-and-push@v3
with:
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -172,7 +172,7 @@ jobs:
latest
- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
uses: noi-techpark/github-actions/docker-deploy@v3
with:
hosts: 'prod'
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
- name: Test code
uses: noi-techpark/github-actions/maven-test@v2
uses: noi-techpark/github-actions/maven-test@v3
with:
java-version: ${{ env.JAVA_VERSION }}
test-command: 'mvn -B test'
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:

# Release Production SDK
release-sdk-prod:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: test
concurrency: release-sdk-prod
Expand Down

0 comments on commit 707fe63

Please sign in to comment.