mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-02 10:35:08 -05:00
Only publish release AMIs
This commit is contained in:
parent
a96f07dbdd
commit
e9fecec0bc
@ -45,6 +45,9 @@ outputs:
|
|||||||
awsImageName:
|
awsImageName:
|
||||||
description: "AWS image name"
|
description: "AWS image name"
|
||||||
value: ${{ steps.aws.outputs.imageName }}
|
value: ${{ steps.aws.outputs.imageName }}
|
||||||
|
awsPublish:
|
||||||
|
description: "Should AWS AMI be published"
|
||||||
|
value: ${{ steps.aws.outputs.publish }}
|
||||||
azureResourceGroupName:
|
azureResourceGroupName:
|
||||||
description: "Azure resource group name"
|
description: "Azure resource group name"
|
||||||
value: ${{ steps.azure.outputs.resourceGroupName }}
|
value: ${{ steps.azure.outputs.resourceGroupName }}
|
||||||
@ -144,11 +147,14 @@ runs:
|
|||||||
if [ "${imageType}" = release ]
|
if [ "${imageType}" = release ]
|
||||||
then
|
then
|
||||||
echo "imageName=constellation-${imageVersion}" >> $GITHUB_OUTPUT
|
echo "imageName=constellation-${imageVersion}" >> $GITHUB_OUTPUT
|
||||||
|
echo "publish=true" >> $GITHUB_OUTPUT
|
||||||
elif [ "${imageType}" = debug ]
|
elif [ "${imageType}" = debug ]
|
||||||
then
|
then
|
||||||
echo "imageName=constellation-debug-${semver}-${timestamp}" >> $GITHUB_OUTPUT
|
echo "imageName=constellation-debug-${semver}-${timestamp}" >> $GITHUB_OUTPUT
|
||||||
|
echo "publish=false" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "imageName=constellation-${branchName}-${timestamp}" >> $GITHUB_OUTPUT
|
echo "imageName=constellation-${branchName}-${timestamp}" >> $GITHUB_OUTPUT
|
||||||
|
echo "publish=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# gallery name may include alphanumeric characters, dots and underscores. Must end and begin with an alphanumeric character
|
# gallery name may include alphanumeric characters, dots and underscores. Must end and begin with an alphanumeric character
|
||||||
|
1
.github/workflows/build-os-image.yml
vendored
1
.github/workflows/build-os-image.yml
vendored
@ -336,6 +336,7 @@ jobs:
|
|||||||
AWS_IMAGE_PATH: ${{ steps.vars.outputs.awsImagePath }}
|
AWS_IMAGE_PATH: ${{ steps.vars.outputs.awsImagePath }}
|
||||||
AWS_REGION: ${{ steps.vars.outputs.awsRegion }}
|
AWS_REGION: ${{ steps.vars.outputs.awsRegion }}
|
||||||
AWS_REPLICATION_REGIONS: ${{ steps.vars.outputs.awsReplicationRegions }}
|
AWS_REPLICATION_REGIONS: ${{ steps.vars.outputs.awsReplicationRegions }}
|
||||||
|
AWS_PUBLISH: ${{ steps.vars.outputs.awsPublish }}
|
||||||
|
|
||||||
- name: Upload GCP image
|
- name: Upload GCP image
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -87,6 +87,9 @@ tag_ami_with_backing_snapshot() {
|
|||||||
make_ami_public() {
|
make_ami_public() {
|
||||||
local ami_id=$1
|
local ami_id=$1
|
||||||
local region=$2
|
local region=$2
|
||||||
|
if [ "${AWS_PUBLISH-}" != "true" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
aws ec2 modify-image-attribute \
|
aws ec2 modify-image-attribute \
|
||||||
--region "${region}" \
|
--region "${region}" \
|
||||||
--image-id "${ami_id}" \
|
--image-id "${ami_id}" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user