Skip to content

CI fails on cachix-action if user has no install-tests cache #5173

@abathur

Description

@abathur

While telling someone about the install tests @domenkozar added in #4549 and I updated in #4577, I noticed that not having cachix set up for install tests causes failures like https://github.com/matthewbauer/nix/runs/3416896499?check_suite_focus=true#step:5:12:

Binary cache matthewbauer-nix-install-tests doesn't exist or it's private. Start by visiting https://app.cachix.org and create a personal/cache auth token.

This is coming from

- uses: cachix/cachix-action@v10
with:
name: '${{ env.CACHIX_NAME }}'
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

The check_cachix step I introduced in #4577 should have the right general logic for this, and I think single steps can be made conditional, so maybe the tests job can also use needs: [check_cachix], and then the cachix-action step can use if: needs.check_cachix.outputs.secret == 'true' to avoid running this step unless a credential is set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions