Merge pull request #168 from IBM/bugfix/link-omegamon #322
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: ibm-rmf-grafana | |
| on: | |
| push: | |
| branches: | |
| - "staging/v*" | |
| - "release/v*" | |
| tags: | |
| - "ibm-rmf-grafana/v*" | |
| pull_request: | |
| branches: | |
| - "staging/v*" | |
| - "release/v*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: grafana/rmf-app | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: grafana/rmf-app/.nvmrc | |
| cache: "yarn" | |
| cache-dependency-path: "grafana/rmf-app/yarn.lock" | |
| - name: Setup Golang | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: grafana/rmf-app/go.mod | |
| cache-dependency-path: grafana/rmf-app/go.sum | |
| - name: Test | |
| run: make test | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| only-new-issues: true | |
| working-directory: grafana/rmf-app | |
| - name: Build | |
| run: make all | |
| - name: Fetch Release Notes | |
| id: changelog | |
| run: | | |
| awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > RELEASE_NOTES.md | |
| - name: Upload Build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rmf-app-grafana | |
| path: | | |
| grafana/rmf-app/RELEASE_NOTES.md | |
| grafana/rmf-app/build/ibm-rmf-grafana-* | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/ibm-rmf-grafana/v') | |
| steps: | |
| - name: Download Build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: rmf-app-grafana | |
| - name: Release Draft | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| prerelease: false | |
| draft: true | |
| files: | | |
| build/ibm-rmf-grafana-* | |
| body_path: RELEASE_NOTES.md |