refactor(grafanaplane): split modules into directories and add new Pr… #281
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: Push | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: {} | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: setup Crossplane cli | |
| uses: crossplane-contrib/setup-crossplane-action@cb8aac3f1246b19f101e7f85fd0a38623b4d5ad3 # v0.1.1 | |
| - name: Log in to the GitHub Container registry | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push xpkg | |
| run: make push | |
| deploy: | |
| name: Trigger Argo Workflow Deployment | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| steps: | |
| - name: Extract version | |
| id: version | |
| run: | | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "Deploying version: ${VERSION}" | |
| - name: Trigger Argo Workflow | |
| id: trigger-argo-workflow | |
| uses: grafana/shared-workflows/actions/trigger-argo-workflow@b513eb1dfd9becfa671a41e55063cdd5c0a08031 # trigger-argo-workflow/v1.2.2 | |
| with: | |
| namespace: platform-monitoring-cd | |
| workflow_template: grafana-crossplane-libsonnet-packages | |
| parameters: | | |
| dockertag=${{ steps.version.outputs.version }} | |
| prCommentContext= Triggered by release ${{ steps.version.outputs.version }} in crossplane/grafana-crossplane-libsonnet | |
| commit_author=grafana-delivery-bot |