Skip to content

Run `dub upgrade` trying to repeat on network failure and using package cache on GitHub Actions

Notifications You must be signed in to change notification settings

WebFreak001/dub-upgrade

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

Repository files navigation

dub-upgrade

GitHub Actions CI Action to run dub upgrade with automatic retry on network failure and caching package downloads and optionally also compiled library binaries across builds using dub's native caching functionality.

Usage

Basic usage:

steps:
  - uses: actions/checkout@v1

  - uses: dlang-community/setup-dlang@v1 # install D compiler & Dub
    with:
      compiler: dmd-latest

  - uses: WebFreak001/dub-upgrade@v0.1

  - name: Run tests # do whatever with upgraded & fetched dependencies
    run: dub test

Caching compiled binaries:

steps:
  - uses: actions/checkout@v1

  - uses: dlang-community/setup-dlang@v1 # install D compiler & Dub
    with:
      compiler: dmd-latest

  - uses: WebFreak001/dub-upgrade@v0.1

  - name: Run tests # do whatever with upgraded & fetched dependencies
    run: dub test

  - uses: WebFreak001/dub-upgrade@v0.1 # second call to cache dependency binaries
    with:
      store: true # set this to true to not run an upgrade but only update cache

Not using cache, only retrying on network failure:

steps:
  - uses: actions/checkout@v1

  - uses: dlang-community/setup-dlang@v1 # install D compiler & Dub
    with:
      compiler: dmd-latest

  - uses: WebFreak001/dub-upgrade@v0.1
    with:
      cache: false

  - name: Run tests # do whatever with upgraded & fetched dependencies
    run: dub test

About

Run `dub upgrade` trying to repeat on network failure and using package cache on GitHub Actions

Resources

Stars

Watchers

Forks

Packages

No packages published