Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cache-upload

cache-upload #919

Workflow file for this run

name: cache-upload
# Uploads devbox nix dependencies to cache
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '30 8 * * *' # Run nightly at 8:30 UTC
permissions:
contents: read
pull-requests: read
defaults:
run:
shell: bash
env:
DEVBOX_API_TOKEN: ${{ secrets.DEVBOX_API_TOKEN }}
DEVBOX_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEVBOX_DEBUG: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# I think this should be added to individual nix commands within devbox, but this is quick fix for now
NIX_CONFIG: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
jobs:
upload-cache:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
# Build devbox from scratch because released devbox has a bug that prevents
# DEVBOX_API_TOKEN use
# we can remove this after 0.10.6 is out.
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Build devbox
run: |
go build -o dist/devbox ./cmd/devbox
sudo mv ./dist/devbox /usr/local/bin/
# - name: Install devbox
# uses: jetify-com/devbox-install-action@v0.14.0
# with:
# enable-cache: true
# We upload twice, once before updating and once after. This shows a simple
# method to cache the latest current and latest dependencies.
# If we want read access to cache on multi-user nix installs (e.g. macos),
# we need to call devbox cache configure. This is currently not working
# as expected on CICD.
- name: Upload cache
run: |
devbox cache upload
devbox update
devbox cache upload
Morty Proxy This is a proxified and sanitized view of the page, visit original site.