From ab1ad9d79cfc211a18f1db0119dd1387b146a207 Mon Sep 17 00:00:00 2001 From: BodoBolero Date: Tue, 25 Jun 2024 17:56:48 +0200 Subject: [PATCH 1/4] prepare periodic tests on non-github action runners that want to download artefacts for a specific commit hash --- .github/actions/download/action.yml | 2 +- .github/actions/upload/action.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/download/action.yml b/.github/actions/download/action.yml index ce26e7825b81..a4cfc90d64c7 100644 --- a/.github/actions/download/action.yml +++ b/.github/actions/download/action.yml @@ -26,7 +26,7 @@ runs: TARGET: ${{ inputs.path }} ARCHIVE: /tmp/downloads/${{ inputs.name }}.tar.zst SKIP_IF_DOES_NOT_EXIST: ${{ inputs.skip-if-does-not-exist }} - PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}', github.run_id, github.run_attempt) }} + PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.sha, github.run_id, github.run_attempt) }} run: | BUCKET=neon-github-public-dev FILENAME=$(basename $ARCHIVE) diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index 63973dfbe7dd..120b74f2c06b 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -8,7 +8,7 @@ inputs: description: "A directory or file to upload" required: true prefix: - description: "S3 prefix. Default is '${GITHUB_RUN_ID}/${GITHUB_RUN_ATTEMPT}'" + description: "S3 prefix. Default is '${GITHUB_SHA}/${GITHUB_RUN_ID}/${GITHUB_RUN_ATTEMPT}'" required: false runs: @@ -45,7 +45,7 @@ runs: env: SOURCE: ${{ inputs.path }} ARCHIVE: /tmp/uploads/${{ inputs.name }}.tar.zst - PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}', github.run_id, github.run_attempt) }} + PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.sha, github.run_id, github.run_attempt) }} run: | BUCKET=neon-github-public-dev FILENAME=$(basename $ARCHIVE) From fd17b55bedc0c5a36329fa3c330524e1a094297c Mon Sep 17 00:00:00 2001 From: Peter Bendel Date: Tue, 25 Jun 2024 19:38:04 +0200 Subject: [PATCH 2/4] Update .github/actions/download/action.yml Co-authored-by: Alexander Bayandin --- .github/actions/download/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/download/action.yml b/.github/actions/download/action.yml index a4cfc90d64c7..01c216b1ac23 100644 --- a/.github/actions/download/action.yml +++ b/.github/actions/download/action.yml @@ -26,7 +26,7 @@ runs: TARGET: ${{ inputs.path }} ARCHIVE: /tmp/downloads/${{ inputs.name }}.tar.zst SKIP_IF_DOES_NOT_EXIST: ${{ inputs.skip-if-does-not-exist }} - PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.sha, github.run_id, github.run_attempt) }} + PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.event.pull_request.head.sha || github.sha, github.run_id, github.run_attempt) }} run: | BUCKET=neon-github-public-dev FILENAME=$(basename $ARCHIVE) From e62b55ca39961130e6fbc92bf7b10c80199e645b Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Tue, 25 Jun 2024 19:00:42 +0100 Subject: [PATCH 3/4] Update .github/actions/upload/action.yml --- .github/actions/upload/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index 120b74f2c06b..1c46c50ee232 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -45,7 +45,7 @@ runs: env: SOURCE: ${{ inputs.path }} ARCHIVE: /tmp/uploads/${{ inputs.name }}.tar.zst - PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.sha, github.run_id, github.run_attempt) }} + PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.sha, github.event.pull_request.head.sha || github.sha, github.run_attempt) }} run: | BUCKET=neon-github-public-dev FILENAME=$(basename $ARCHIVE) From 050dd70dd490b28fffe527eae9fb8a1222b5c59c Mon Sep 17 00:00:00 2001 From: BodoBolero Date: Tue, 25 Jun 2024 22:44:16 +0200 Subject: [PATCH 4/4] fix typo from review suggestion --- .github/actions/upload/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index 1c46c50ee232..edcece7d2be0 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -45,7 +45,7 @@ runs: env: SOURCE: ${{ inputs.path }} ARCHIVE: /tmp/uploads/${{ inputs.name }}.tar.zst - PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.sha, github.event.pull_request.head.sha || github.sha, github.run_attempt) }} + PREFIX: artifacts/${{ inputs.prefix || format('{0}/{1}/{2}', github.event.pull_request.head.sha || github.sha, github.run_id , github.run_attempt) }} run: | BUCKET=neon-github-public-dev FILENAME=$(basename $ARCHIVE)