diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 22dbdf5d..a988ef81 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -9,7 +9,39 @@ concurrency: cancel-in-progress: true jobs: + version: + runs-on: ubuntu-latest + outputs: + new_tag: ${{ steps.tag_version.outputs.new_tag }} + steps: + - uses: actions/checkout@v4 + + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + dry_run: true + fetch_all_tags: true + + - uses: actions/github-script@v6 + env: + VERSION: '${{ steps.tag_version.outputs.new_tag }}' + with: + script: | + /* Set Summary */ + const microservices = ['python', 'java', 'node'] + const header = [ + { data: 'Component', header: true }, + { data: 'Version', header: true } + ] + core.summary + .addHeading('Building :gear:', (level = 2)) + .addTable([header, ...microservices.map(m => [m, process.env.VERSION])]) + .write() + python: + needs: [version] uses: ./.github/workflows/python-app.yaml permissions: packages: write @@ -19,6 +51,7 @@ jobs: MICROSERVICE: vote maven: + needs: [version] uses: ./.github/workflows/maven-app.yaml permissions: packages: write @@ -27,6 +60,7 @@ jobs: MICROSERVICE: worker node: + needs: [version] uses: ./.github/workflows/node-app.yaml permissions: packages: write @@ -36,6 +70,7 @@ jobs: TRIVY_EXIT_CODE: '0' test: + needs: [version] uses: ./.github/workflows/container-build.yaml with: MICROSERVICE: tests @@ -55,3 +90,10 @@ jobs: e2e-test: needs: [python, maven, node, test] uses: ./.github/workflows/test-e2e.yaml + + ready: + needs: [security, e2e-test] + runs-on: ubuntu-latest + steps: + - name: Generate Release + run: echo "Generate Release"