aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorCyril Cohen2020-06-08 14:47:52 +0200
committerGitHub2020-06-08 14:47:52 +0200
commit6762000c7f109648c6793571125dcfdc13ff4731 (patch)
treec4d3a7cff5a64a0fe77c3a05c261ee9e42a5455a /.github/workflows
parent239983ff051581d8ddaa3db6fdd0a4a0189bfa88 (diff)
Cachix action (#525)
tentative fix
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/nix.yml21
1 files changed, 11 insertions, 10 deletions
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
index bd399a8..8446b1c 100644
--- a/.github/workflows/nix.yml
+++ b/.github/workflows/nix.yml
@@ -11,20 +11,21 @@ jobs:
coq: [ "8.11", "8.10", "8.9", "8.8", "8.7" ]
steps:
- name: Get branch shortname
- run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- id: branch-short-name
- - name: Get repo name
- run: echo "##[set-output name=repo;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1)"
- id: repo-name
- - name: Get repo lowercase name
- run: echo "##[set-output name=repo;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1 | tr '[:upper:]' '[:lower:]')"
- id: repo-lowercase-name
+ run: echo "##[set-output name=name;]$(echo ${GITHUB_REF#refs/heads/})"
+ id: branch-short
+ - name: Get owner name
+ run: echo "##[set-output name=name;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1)"
+ id: owner
+ - name: Get owner lowercase name
+ run: echo "##[set-output name=name;]$(echo $GITHUB_REPOSITORY | cut -d/ -f1 | tr '[:upper:]' '[:lower:]')"
+ id: owner-lowercase
- uses: cachix/install-nix-action@v8
- uses: cachix/cachix-action@v6
+ if: steps.owner.outputs.name == 'math-comp' || steps.owner.outputs.name == 'CohenCyril'
with:
# Name of a cachix cache to push and pull/substitute
- name: ${{ steps.repo-lowercase-name.outputs.repo }}
+ name: ${{ steps.owner-lowercase.outputs.name }}
# Authentication token for Cachix, needed only for private cache access
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# building fake mathcomp-fast target
- - run: nix-build https://github.com/math-comp/math-comp-nix/archive/master.tar.gz --arg config '{coq = "${{ matrix.coq }}"; mathcomp = "${{ steps.repo-name.outputs.repo }}/${{ steps.branch-short-name.outputs.branch }}";}' --argstr package mathcomp
+ - run: nix-build https://github.com/math-comp/math-comp-nix/archive/master.tar.gz --arg config '{coq = "${{ matrix.coq }}"; mathcomp = "${{ steps.owner.outputs.name }}/${{ steps.branch-short.outputs.name }}";}' --argstr package mathcomp