Skip to content

Commit

Permalink
Ci workflow for PRs, update main workflow to release
Browse files Browse the repository at this point in the history
  • Loading branch information
adrapereira committed Apr 5, 2024
1 parent e01fd55 commit ff541cf
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
sudo apt-get install jq
export GRAFANA_PLUGIN_ID=$(cat dist/plugin.json | jq -r .id)
export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}.zip
export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-main.zip
echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT
echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
name: Build and release main to GCS

on:
workflow_dispatch:
push:
pull_request:
branches:
- main
paths-ignore: # Don't run the workflow if only docs files have been changed
- 'docs/**'
- '**.md'

jobs:
build:
uses: grafana/explore-traces/.github/workflows/build.yml@main
upload:
runs-on: ubuntu-latest
needs:
- build
steps:
- id: 'upload-to-gcs'
name: 'Upload assets to main'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: ./${{ needs.build.outputs.archive }}
destination: 'integration-artifacts/grafana-exploretraces-app/'
parent: false
uses: grafana/explore-traces/.github/workflows/build.yml@main
25 changes: 25 additions & 0 deletions .github/workflows/update-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and release main to GCS

on:
push:
branches:
- main
paths-ignore: # Don't run the workflow if only docs files have been changed
- 'docs/**'
- '**.md'

jobs:
build:
uses: grafana/explore-traces/.github/workflows/build.yml@main
upload:
runs-on: ubuntu-latest
needs:
- build
steps:
- id: 'upload-to-gcs'
name: 'Upload assets to main'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: ./grafana-exploretraces-app-main.zip
destination: 'integration-artifacts/grafana-exploretraces-app/'
parent: false

0 comments on commit ff541cf

Please sign in to comment.