build: Add releases #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request | |
on: | |
pull_request: | |
push: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
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/[email protected] | |
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 | |
contents: read | |
checks: write | |
with: | |
MICROSERVICE: vote | |
maven: | |
needs: [version] | |
uses: ./.github/workflows/maven-app.yaml | |
permissions: | |
packages: write | |
contents: read | |
with: | |
MICROSERVICE: worker | |
node: | |
needs: [version] | |
uses: ./.github/workflows/node-app.yaml | |
permissions: | |
packages: write | |
contents: read | |
with: | |
MICROSERVICE: result | |
TRIVY_EXIT_CODE: '0' | |
test: | |
needs: [version] | |
uses: ./.github/workflows/container-build.yaml | |
with: | |
MICROSERVICE: tests | |
TRIVY_EXIT_CODE: '0' | |
security: | |
uses: ./.github/workflows/security.yaml | |
permissions: | |
# required for all workflows | |
security-events: write | |
# only required for workflows in private repositories | |
actions: read | |
contents: read | |
with: | |
MICROSERVICES: vote,worker,result | |
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" |