Fix dagger cache command and remove test workflow
- Remove 'dagger cache prune' which doesn't exist in dagger 0.9.3 - Add CACHE_BUSTER environment variable to E2E workflow for cache invalidation - Delete test-dagger-build.yml workflow as it's no longer needed - Use combination of run_number and commit SHA for unique cache keys
This commit is contained in:
@@ -7,10 +7,9 @@ on:
|
||||
- main
|
||||
- release-*.*.*
|
||||
|
||||
# Temporarily disabled concurrency to bypass stuck workflow
|
||||
# concurrency:
|
||||
# group: ${{ github.workflow }}-${{ github.ref }}
|
||||
# cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
||||
|
||||
permissions: {}
|
||||
|
||||
@@ -47,13 +46,9 @@ jobs:
|
||||
with:
|
||||
path: ./grafana
|
||||
persist-credentials: false
|
||||
- name: Clear dagger cache
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
with:
|
||||
version: "0.9.3"
|
||||
verb: cache
|
||||
args: prune --all
|
||||
- uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
env:
|
||||
CACHE_BUSTER: ${{ github.run_number }}-${{ github.sha }}
|
||||
with:
|
||||
version: "0.9.3"
|
||||
verb: run
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
name: Test Dagger Build Only
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- baldm0mma/bp_infra_11.4.8
|
||||
|
||||
jobs:
|
||||
test-dagger-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ./grafana
|
||||
persist-credentials: false
|
||||
|
||||
- name: Clear dagger cache
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
with:
|
||||
version: "0.9.3"
|
||||
verb: cache
|
||||
args: prune
|
||||
|
||||
- name: Test core build (same as E2E workflow)
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
with:
|
||||
version: "0.9.3"
|
||||
verb: run
|
||||
args: go -C grafana run ./pkg/build/cmd artifacts -a targz:grafana:linux/amd64 --grafana-dir="${PWD}/grafana" > out.txt
|
||||
|
||||
- run: mv "$(cat out.txt)" grafana.tar.gz
|
||||
- name: Check if artifacts were created
|
||||
run: |
|
||||
ls -la grafana.tar.gz
|
||||
echo "Core build completed successfully!"
|
||||
Reference in New Issue
Block a user