use floating tag for convenience #57
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: Dashboards CI | |
| # this workflow will | |
| # - check for JSON syntax errors on every pull request | |
| # - commit to the OBS development upstream whenever the main branch is updated | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "Makefile" | |
| - "dashboards/**" | |
| - "packaging/obs/grafana-ha-cluster-dashboards/**" | |
| - ".github/workflows/dashboards*" | |
| pull_request: | |
| paths: | |
| - "Makefile" | |
| - "dashboards/**" | |
| - "packaging/obs/grafana-ha-cluster-dashboards/**" | |
| - ".github/workflows/dashboards*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v1 | |
| - run: npm -g install jsonlint | |
| - name: validate JSON | |
| run: find dashboards -name "*.json" -type f -exec jsonlint -c {} \; | |
| obs-commit: | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/trento-project/continuous-delivery:0.1.x | |
| options: -u 0:0 | |
| env: | |
| OBS_USER: ${{ secrets.OBS_USER }} | |
| OBS_PASS: ${{ secrets.OBS_PASS }} | |
| OBS_PROJECT: ${{ secrets.OBS_PROJECT }} | |
| REVISION: ${{ github.sha }} | |
| REPOSITORY: ${{ github.repository }} | |
| GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: configure OSC | |
| run: /scripts/init_osc_creds.sh | |
| - run: make dashboards-obs-commit |