Skip to content

fix: secrets to shared workflows #378

fix: secrets to shared workflows

fix: secrets to shared workflows #378

Workflow file for this run

name: Build and Publish
on:
push:
branches:
- 'main'
- 'feat/**'
- 'chore/**'
- 'fix/**'
pull_request:
branches:
- 'main'
jobs:
Build-Setup:
runs-on: ubuntu-latest
outputs:
test-suite: ${{ steps.set-test-suite.outputs.GITHUB_TEST_SUITE }}
ANYPOINT_CLIENT_ID: ${{ secrets.ANYPOINT_CLIENT_ID }}
ANYPOINT_CLIENT_SECRET: ${{ secrets.ANYPOINT_CLIENT_SECRET }}
ANYPOINT_CONNECTED_APP_ID: ${{ secrets.ANYPOINT_CONNECTED_APP_ID }}
ANYPOINT_CONNECTED_APP_SECRET: ${{ secrets.ANYPOINT_CONNECTED_APP_SECRET }}
ANYPOINT_USERNAME: ${{ secrets.ANYPOINT_USERNAME }}
ANYPOINT_PASSWORD: ${{ secrets.ANYPOINT_PASSWORD }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: 'recursive'
- name: Set test suite
id: set-test-suite
if: github.ref != 'refs/heads/master' && github.event_name != 'pull_request'
run: echo "GITHUB_TEST_SUITE=UnitTestSuite" >> $GITHUB_ENV
Build-Maven:
needs: Build-Setup
uses: avioconsulting/shared-workflows/.github/workflows/maven-build.yml@main
secrets: inherit
with:
include-mule-ee-repo: true
maven-args: -Dtest=${{ needs.Build-Setup.outputs.test-suite }} -Danypoint.client.id=${{ needs.Build-Setup.outputs.ANYPOINT_CLIENT_ID }} -Danypoint.client.secret=${{needs.Build-Setup.outputs.ANYPOINT_CLIENT_SECRET}} -Danypoint.connected-app.id=${{needs.Build-Setup.outputs.ANYPOINT_CONNECTED_APP_ID}} -Danypoint.connected-app.secret=${{needs.Build-Setup.outputs.ANYPOINT_CONNECTED_APP_SECRET}} -Danypoint.username=${{needs.Build-Setup.outputs.ANYPOINT_USERNAME}} -Danypoint.password=${{needs.Build-Setup.outputs.ANYPOINT_PASSWORD}}
Release-Maven:
needs: Build-Maven
uses: avioconsulting/shared-workflows/.github/workflows/maven-release.yml@main
secrets: inherit
with:
app-version: ${{ needs.Build-Maven.outputs.app-version }}
publish-maven-central: true
# java-distribution: adopt-hotspot
# java-version: 8
# maven-args: -X
# main-branch: main
Post-Release-Maven:
needs: [Build-Maven, Release-Maven]
uses: avioconsulting/shared-workflows/.github/workflows/maven-post-release.yml@main
secrets: inherit
with:
app-version: ${{ needs.Build-Maven.outputs.app-version }}
# java-distribution: adopt-hotspot
# java-version: 8
# maven-args: -X
# main-branch: main
# pr-reviewers: adesjardin, manikmagar, kkingavio