diff --git a/.github/workflows/build_bench.yml b/.github/workflows/build_bench.yml index 9f8fd510..a3c87984 100644 --- a/.github/workflows/build_bench.yml +++ b/.github/workflows/build_bench.yml @@ -34,6 +34,9 @@ jobs: - name: Set Environment Variables run: cat example.env | grep -o '^[^#]*' >> "$GITHUB_ENV" + - name: Get Bench Latest Version + run: echo "LATEST_BENCH_RELEASE=$(curl -s 'https://api.github.com/repos/frappe/bench/releases/latest' | jq -r '.tag_name')" >> "$GITHUB_ENV" + - name: Build and test uses: docker/bake-action@v3.1.0 with: diff --git a/docker-bake.hcl b/docker-bake.hcl index 568e0668..df77e849 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -32,6 +32,10 @@ variable "BENCH_REPO" { default = "https://github.com/frappe/bench" } +variable "LATEST_BENCH_RELEASE" { + default = "latest" +} + # Bench image target "bench" { @@ -40,7 +44,7 @@ target "bench" { } context = "images/bench" target = "bench" - tags = ["frappe/bench:latest"] + tags = ["frappe/bench:${LATEST_BENCH_RELEASE}"] } target "bench-test" {