From a82eb3fb3d073c9dd99748883d2cd98ff4a38903 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Wed, 31 Jan 2024 18:32:37 +0100 Subject: [PATCH] ci: upload canary latest to correct path (#22210) Also don't always upload cache - this was a bug I introduced in the CI refactor. --- .github/workflows/ci.generate.ts | 5 ++--- .github/workflows/ci.yml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index cd5e6426f1..768323c9f8 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -726,7 +726,7 @@ const ci = { run: [ 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/', "echo ${{ github.sha }} > canary-latest.txt", - 'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-${{ matrix.arch }}-latest.txt', + 'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt', ].join("\n"), }, { @@ -992,8 +992,7 @@ const ci = { name: "Save cache build output (main)", uses: "actions/cache/save@v3", if: - // TODO(@lucacasonato): revert before landing - "(matrix.job == 'test' || matrix.job == 'lint')", // && github.ref == 'refs/heads/main'", + "(matrix.job == 'test' || matrix.job == 'lint') && github.ref == 'refs/heads/main'", with: { path: [ "./target", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35b0a1af38..898fcd7185 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -438,7 +438,7 @@ jobs: run: |- gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/ echo ${{ github.sha }} > canary-latest.txt - gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-${{ matrix.arch }}-latest.txt + gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt - name: Autobahn testsuite if: |- !(matrix.skip) && (matrix.os == 'linux' && @@ -623,7 +623,7 @@ jobs: draft: true - name: Save cache build output (main) uses: actions/cache/save@v3 - if: '!(matrix.skip) && ((matrix.job == ''test'' || matrix.job == ''lint''))' + if: '!(matrix.skip) && ((matrix.job == ''test'' || matrix.job == ''lint'') && github.ref == ''refs/heads/main'')' with: path: |- ./target