mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-14 18:34:31 -05:00
8c1972c335
* Fix parameter expansion when uploading multiple files * On download, ensure target directory exists * Rename encryption-secret -> encryptionSecret * Remove incorrect secret access from e2e test action * Add missing checkout action to workflows using our download action * Fix spacing * Fix upload action uploading whole directory structure instead of target files * Explicitly give write permissions to Azure disk image, since permissions are no longer dropped on upload --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Download artifact
|
|
description: Download and decrypt an artifact.
|
|
|
|
inputs:
|
|
name:
|
|
description: 'The name of the artifact.'
|
|
required: true
|
|
path:
|
|
description: 'Download to a specified path.'
|
|
required: false
|
|
default: ./
|
|
encryptionSecret:
|
|
description: 'The secret to use for decrypting the artifact.'
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install unzip
|
|
uses: ./.github/actions/setup_bazel_nix
|
|
with:
|
|
nixTools: |
|
|
unzip
|
|
|
|
- name: Create temporary directory
|
|
id: tempdir
|
|
shell: bash
|
|
run: echo "directory=$(mktemp -d)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Download the artifact
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
|
with:
|
|
name: ${{ inputs.name }}
|
|
path: ${{ steps.tempdir.outputs.directory }}
|
|
|
|
- name: Decrypt and unzip archive
|
|
shell: bash
|
|
run: |
|
|
mkdir -p ${{ inputs.path }}
|
|
unzip -P '${{ inputs.encryptionSecret }}' -qq -d ${{ inputs.path }} ${{ steps.tempdir.outputs.directory }}/archive.zip
|