Add validation check for s3_dest_dir if pushing to download.memgraph.com
This commit is contained in:
parent
37f4082ee8
commit
ce8200238f
12
.github/workflows/reusable_docker_package.yaml
vendored
12
.github/workflows/reusable_docker_package.yaml
vendored
@ -46,7 +46,7 @@ on:
|
|||||||
s3_region:
|
s3_region:
|
||||||
type: string
|
type: string
|
||||||
description: "Region for the target S3 bucket."
|
description: "Region for the target S3 bucket."
|
||||||
default: ''
|
default: 'eu-west-1'
|
||||||
s3_dest_dir:
|
s3_dest_dir:
|
||||||
type: string
|
type: string
|
||||||
description: "Target dir path in S3 bucket."
|
description: "Target dir path in S3 bucket."
|
||||||
@ -134,6 +134,16 @@ jobs:
|
|||||||
needs: [package]
|
needs: [package]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Validate dest_dir
|
||||||
|
if: ${{ inputs.s3_bucket == 'download.memgraph.com' }}
|
||||||
|
run: |
|
||||||
|
if ! [[ "${{ inputs.s3_dest_dir }}" =~ memgraph/[0-9]\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo -e "Error: ${{ inputs.s3_dest_dir }} is not a valid official format. When pushing to 'download.memgraph.com' the dest dir has to match format 'memgraph/X.Y.Z'!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo -e "Passed: Dest dir ${{ inputs.s3_dest_dir }} has a valid official format."
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
12
.github/workflows/reusable_package.yaml
vendored
12
.github/workflows/reusable_package.yaml
vendored
@ -46,7 +46,7 @@ on:
|
|||||||
s3_region:
|
s3_region:
|
||||||
type: string
|
type: string
|
||||||
description: "Region for the target S3 bucket."
|
description: "Region for the target S3 bucket."
|
||||||
default: ''
|
default: 'eu-west-1'
|
||||||
s3_dest_dir:
|
s3_dest_dir:
|
||||||
type: string
|
type: string
|
||||||
description: "Target dir path in S3 bucket."
|
description: "Target dir path in S3 bucket."
|
||||||
@ -129,6 +129,16 @@ jobs:
|
|||||||
needs: [package]
|
needs: [package]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Validate dest_dir
|
||||||
|
if: ${{ inputs.s3_bucket == 'download.memgraph.com' }}
|
||||||
|
run: |
|
||||||
|
if ! [[ "${{ inputs.s3_dest_dir }}" =~ memgraph/[0-9]\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo -e "Error: ${{ inputs.s3_dest_dir }} is not a valid official format. When pushing to 'download.memgraph.com' the dest dir has to match format 'memgraph/X.Y.Z'!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo -e "Passed: Dest dir ${{ inputs.s3_dest_dir }} has a valid official format."
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user