diff --git a/.github/actions/login_openstack/action.yml b/.github/actions/login_openstack/action.yml new file mode 100644 index 000000000..f009555b9 --- /dev/null +++ b/.github/actions/login_openstack/action.yml @@ -0,0 +1,16 @@ +name: OpenStack login +description: "Login to OpenStack" +inputs: + clouds_yaml: + description: "Credentials authorized to create Constellation on OpenStack." + required: true +runs: + using: "composite" + steps: + - name: Login to OpenStack + env: + CLOUDS_YAML: ${{ inputs.clouds_yaml }} + shell: bash + run: | + mkdir -p ~/.config/openstack + echo "${CLOUDS_YAML}" > ~/.config/openstack/clouds.yaml diff --git a/.github/workflows/build-os-image.yml b/.github/workflows/build-os-image.yml index e2f15d97f..68dac3d6d 100644 --- a/.github/workflows/build-os-image.yml +++ b/.github/workflows/build-os-image.yml @@ -162,6 +162,11 @@ jobs: with: service_account: "image-uploader@constellation-images.iam.gserviceaccount.com" + - name: Login to OpenStack + uses: ./.github/actions/login_openstack + with: + clouds_yaml: ${{ secrets.STACKIT_IMAGE_UPLOAD_CLOUDS_YAML }} + - name: Build and upload id: build shell: bash