Skip to content

Cache One

Cache One #230

Workflow file for this run

# Runs a single ecosystem and fills the cache.
name: Cache One
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
git-ref:
description: git ref
required: true
default: main
package_manager:
description: The package manager to use
required: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
cache_one:
runs-on: ubuntu-latest
name: Cache ${{ inputs.package_manager }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git-ref }}
- name: Download CLI
run: |
gh release download --repo dependabot/cli -p "*linux-amd64.tar.gz"
tar xzvf *.tar.gz >/dev/null 2>&1
./dependabot --version
# No download first to get a clean cache.
- name: Smoke ${{ inputs.package_manager }}
env:
LOCAL_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./dependabot test -f=tests/smoke-${{ inputs.package_manager }}.yaml --cache=cache
- uses: actions/upload-artifact@v4
with:
name: cache-${{ inputs.package_manager }}
path: cache/