From f18d3e5d4ec9726d25518fcf8ae59d5ebed092e0 Mon Sep 17 00:00:00 2001 From: Adrien Lecharpentier Date: Mon, 24 Apr 2023 14:25:57 +0200 Subject: [PATCH] Update CD workflow --- .github/workflows/cd.yaml | 58 ++++++--------------------------------- 1 file changed, 9 insertions(+), 49 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 31d3a97..f371773 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -7,53 +7,13 @@ on: types: - completed -jobs: - validate: - runs-on: ubuntu-latest - outputs: - should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }} - steps: - - name: Verify CI status - uses: jenkins-infra/verify-ci-status-action@v1.2.2 - id: verify-ci-status - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - output_result: true - - - name: Release Drafter - uses: release-drafter/release-drafter@v5 - if: steps.verify-ci-status.outputs.result == 'success' - with: - name: next - tag: next - version: next - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +permissions: + checks: read + contents: write - - name: Check interesting categories - uses: jenkins-infra/interesting-category-action@v1.2.1 - id: interesting-categories - if: steps.verify-ci-status.outputs.result == 'success' - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - release: - runs-on: ubuntu-latest - needs: [validate] - if: needs.validate.outputs.should_release == 'true' - steps: - - name: Check out - uses: actions/checkout@v3.5.0 - with: - fetch-depth: 0 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - distribution: 'adopt' - java-version: 8 - - name: Release - uses: jenkins-infra/jenkins-maven-cd-action@v1.3.3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }} \ No newline at end of file +jobs: + maven-cd: + uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1 + secrets: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}