Skip to content

This action allows you to upload an artifact with retries in case the upload has failed. It wraps upload-artifact-verify-action and retries it

License

Notifications You must be signed in to change notification settings

cytopia/upload-artifact-retry-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload artifact retry action

GitHub release GitHub marketplace test

This action allows you to upload an artifact with retries in case the upload has failed. It wraps upload-artifact-verify-action and retries it.

▶️ Inputs

The following inputs can be used to alter the Docker tag name determination:

Input Required Default Description
name Yes `` The artifact name.
path Yes `` The local file to upload.
pre_command No `` A bash command to execute before uploading the artifact (e.g.: to create the artifact)
post_command No `` A bash command to execute after downloading the artifact (e.g.: to verify it is the desired file)
The {{download_path}} placeholder is available to refer to the downloaded file.

◀️ Outputs

None

💻 Usage

Simple

on: [push]

jobs:
  job1:
    runs-on: ubuntu-latest
    name: Pull docker image
    steps:

      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Create artifact
        id: file
        shell: bash
        run: |
          PRE_RAND="$( ${RAND} | md5sum | head -c 20;  )"
          PRE_DATE="$( date '+%s' )"
          NAME="${PRE_RAND}-${PRE_DATE}.txt"
          echo "somedata" > "${NAME}"
          echo "::set-output name=path::${NAME}"

      - name: upload artifact
        uses: cytopia/upload-artifact-retry-action@v0.1.2
        with:
          name: ${{ steps.file.outputs.path }}
          path: ${{ steps.file.outputs.path }}

❗ Keep up-to-date with GitHub Dependabot

Since Dependabot has native GitHub Actions support, to enable it on your GitHub repo all you need to do is add the .github/dependabot.yml file:

version: 2
updates:
  # Maintain dependencies for GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"

:octocat: cytopia GitHub Actions

Name Description
docker-tag-action Determines Docker tags based on git branch, commit or git tag
git-ref-matrix-action Create stringified JSON list of git refs to be used as a build matrix
shell-command-retry-action Retries shell commands to avoid failing pipelines due to network issues
upload-artifact-verify-action Upload artifact and verifies it by downloading it again
upload-artifact-retry-action Retries upload-artifact-verify-action
download-artifact-retry-action Download artifact with retry functionality

📄 License

MIT License

Copyright (c) 2022 cytopia

About

This action allows you to upload an artifact with retries in case the upload has failed. It wraps upload-artifact-verify-action and retries it

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published