fix: inherit secrets #1
This file contains hidden or 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: Backend CI checks | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| module-name: | ||
| required: true | ||
| type: string | ||
| secrets: | ||
| inherit: true | ||
| jobs: | ||
| ci-checks: | ||
| name: CI Checks – ${{ inputs.module-name }} | ||
| runs-on: ubuntu-latest | ||
| # contains SOPS secret | ||
| environment: ci | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ./.github/actions/setup-java-maven | ||
| - uses: ./.github/actions/setup-just | ||
| - uses: mdgreenwald/mozilla-sops-action@v1.6.0 | ||
| with: | ||
| version: '3.12.1' | ||
| - name: Create Build Artifact | ||
| run: just lambda install ${{ inputs.module-name }} | ||
| - name: Static Code Analysis | ||
| run: | | ||
| just ${{ inputs.module-name }} lint | ||
| just ${{ inputs.module-name }} code-analysis | ||
| - name: Start LocalStack | ||
| # see https://getsops.io/docs/#encrypting-using-age override default lookup | ||
| env: | ||
| SOPS_AGE_KEY: ${{ secrets.SOPS_SECRET_AGE_KEY }} | ||
| run: just run-localstack | ||
| - name: Deploy Test Stack to LocalStack | ||
| run: just deploy-stack testing | ||
| - name: Run Unit Tests | ||
| run: just ${{ inputs.module-name }} unit-test | ||
| - name: Upload Test Results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-results-${{ inputs.module-name }} | ||
| path: lambda/${{ inputs.module-name }}/target/surefire-reports/ | ||
| - name: Upload Coverage Report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: coverage-${{ inputs.module-name }} | ||
| path: lambda/${{ inputs.module-name }}/target/site/jacoco/ | ||