Skip to content

DownToZero-Cloud/objectstore-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Objectstore Download • GitHub Action

Easily pull artefacts from the DownToZero.cloud Objectstore into your GitHub Actions workflow. This composite action wraps a single curl call so you can keep pipelines declarative and secure.

Prerequisites

  • A DownToZero Objectstore API key with read permission stored as an encrypted secret (e.g. DTZ_API_KEY).
  • The object you want to download must already exist in the bucket configured for your key.

Inputs

Name Required Description Default
api_key Yes Objectstore API key used for authentication.
name Yes Local filename to write the artefact to. When object_key is omitted this is also used as the key in Objectstore.
object_key No Remote object key in Objectstore. If left blank the value of name is used instead. ""

Rate Limiting & Retries

To ensure reliability during high load, this action implements a robust retry mechanism for HTTP 429 (Too Many Requests) responses:

  • Exponential Backoff: Starts with a 5-second wait, doubling the delay with each subsequent attempt (5s, 10s, 20s...).
  • Timeout: The retry loop automatically terminates if the total execution time exceeds 30 seconds.

This prevents the action from failing immediately on transient rate limit errors while ensuring the workflow doesn't hang indefinitely.

Usage

Basic example

Download an artefact whose key is the same as the desired filename:

- name: Download build artefact
  uses: DownToZero-Cloud/objectstore-download@main
  with:
    api_key: ${{ secrets.DTZ_API_KEY }}
    name: build.zip

Explicit object_key

If the object’s key differs from the filename you want on disk:

- name: Pull release package
  uses: DownToZero-Cloud/objectstore-download@main
  with:
    api_key: ${{ secrets.DTZ_API_KEY }}
    name: latest-release.zip
    object_key: releases/2025-06-20/package.zip

Outputs

This action does not expose any outputs. The downloaded file is saved in the runner’s working directory and is therefore available to all subsequent steps.

Complete workflow

name: CI → Download artefact & deploy

on:
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Download artefact from Objectstore
        uses: DownToZero-Cloud/objectstore-download@main
        with:
          api_key: ${{ secrets.DTZ_API_KEY }}
          name: build.zip

      - name: Unzip artefact
        run: unzip build.zip -d dist/

      - name: Deploy to production
        run: ./scripts/deploy.sh dist/

License

MIT

Made with ❤️ by the DevOps team at DownToZero.cloud.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors