diff --git a/README.md b/README.md index 813cfef..a4373e3 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,27 @@ steps: godtools-key: ${{ secrets.GODTOOLS_KEY }} ``` +### Download artifacts + +Allows to download artifacts, like EventKeeper's `events`. It requires [setup](#setup) action. + +Example usage: + +```yaml +--- +steps: + - name: Download events + uses: PiwikPRO/actions/godtools/download@master + env: + HTTP_PROXY: ${{ secrets.FORWARD_PROXY_HTTP }} + HTTPS_PROXY: ${{ secrets.FORWARD_PROXY_HTTPS }} + with: + godtools-config: ${{ secrets.GODTOOLS_CONFIG }} + godtools-key: ${{ secrets.GODTOOLS_KEY }} + artifacts: events + ref: master +``` + --- ## Go diff --git a/godtools/download/action.yaml b/godtools/download/action.yaml new file mode 100644 index 0000000..06b9351 --- /dev/null +++ b/godtools/download/action.yaml @@ -0,0 +1,26 @@ +name: 'Piwik PRO godtools download' +description: 'Downloads content from artifactory' +inputs: + godtools-config: + required: true + description: godtools encrypted configuration + godtools-key: + required: true + description: godtools encryption key + artifacts: + required: true + description: Type of artifacts to download (events etc.) + ref: + required: false + default: master + description: Revision +runs: + using: "composite" + steps: + - name: Download data fom artifactory + shell: bash + run: | + godtools s3 download ${{ inputs.artifacts }} --ref ${{ inputs.ref }} + env: + GODTOOLS_CONFIG: ${{ inputs.godtools-config }} + GODTOOLS_KEY: ${{ inputs.godtools-key }}