fix: envsubst support #109
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| permissions: | |
| checks: write | |
| jobs: | |
| set-version: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/dotnet/sdk:6.0 | |
| outputs: | |
| semVer: ${{ steps.gitversion.outputs.semVer }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: install deps | |
| run: | | |
| apt-get update && apt-get install -y jq git | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| git config user.email ${{ github.actor }}[email protected] | |
| git config user.name ${{ github.actor }} | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/[email protected] | |
| with: | |
| versionSpec: '5.x' | |
| - name: Set SemVer Version | |
| uses: gittools/actions/gitversion/[email protected] | |
| id: gitversion | |
| - name: echo VERSIONS | |
| run: | | |
| echo "REVISION -> $GITHUB_SHA" | |
| echo "VERSION -> $GITVERSION_SEMVER" | |
| test: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: golang:1.24-bookworm | |
| needs: set-version | |
| env: | |
| SEMVER: ${{ needs.set-version.outputs.semVer }} | |
| GIT_TAG: ${{ needs.set-version.outputs.semVer }} | |
| GOVCS: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: install deps | |
| run: | | |
| apt update && apt install -y jq git unzip | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| git config user.email ${{ github.actor }}[email protected] | |
| git config user.name ${{ github.actor }} | |
| - name: Run Lint | |
| run: | | |
| task lint | |
| - name: Run Tests | |
| run: | | |
| task coverage | |
| - name: Publish Junit style Test Report | |
| uses: mikepenz/action-junit-report@v4 | |
| if: always() # always run even if the previous step fails | |
| with: | |
| report_paths: '**/.coverage/report-junit.xml' | |
| - name: Analyze with SonarCloud | |
| # You can pin the exact commit or the version. | |
| uses: SonarSource/[email protected] | |
| env: | |
| SEMVER: $SEMVER | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | |
| with: | |
| # Additional arguments for the sonarcloud scanner | |
| args: | |
| # mandatory | |
| -Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }} | |
| -Dsonar.go.coverage.reportPaths=/github/workspace/.coverage/out | |
| -Dsonar.go.tests.reportPaths=/github/workspace/.coverage/report-junit.xml |