mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
Only publish release AMIs
This commit is contained in:
parent
a96f07dbdd
commit
e9fecec0bc
@ -45,6 +45,9 @@ outputs:
|
||||
awsImageName:
|
||||
description: "AWS image name"
|
||||
value: ${{ steps.aws.outputs.imageName }}
|
||||
awsPublish:
|
||||
description: "Should AWS AMI be published"
|
||||
value: ${{ steps.aws.outputs.publish }}
|
||||
azureResourceGroupName:
|
||||
description: "Azure resource group name"
|
||||
value: ${{ steps.azure.outputs.resourceGroupName }}
|
||||
@ -144,11 +147,14 @@ runs:
|
||||
if [ "${imageType}" = release ]
|
||||
then
|
||||
echo "imageName=constellation-${imageVersion}" >> $GITHUB_OUTPUT
|
||||
echo "publish=true" >> $GITHUB_OUTPUT
|
||||
elif [ "${imageType}" = debug ]
|
||||
then
|
||||
echo "imageName=constellation-debug-${semver}-${timestamp}" >> $GITHUB_OUTPUT
|
||||
echo "publish=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "imageName=constellation-${branchName}-${timestamp}" >> $GITHUB_OUTPUT
|
||||
echo "publish=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# 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_REGION: ${{ steps.vars.outputs.awsRegion }}
|
||||
AWS_REPLICATION_REGIONS: ${{ steps.vars.outputs.awsReplicationRegions }}
|
||||
AWS_PUBLISH: ${{ steps.vars.outputs.awsPublish }}
|
||||
|
||||
- name: Upload GCP image
|
||||
shell: bash
|
||||
|
@ -87,6 +87,9 @@ tag_ami_with_backing_snapshot() {
|
||||
make_ami_public() {
|
||||
local ami_id=$1
|
||||
local region=$2
|
||||
if [ "${AWS_PUBLISH-}" != "true" ]; then
|
||||
return
|
||||
fi
|
||||
aws ec2 modify-image-attribute \
|
||||
--region "${region}" \
|
||||
--image-id "${ami_id}" \
|
||||
|
Loading…
Reference in New Issue
Block a user