Skip to content

feat(ci): compile, mirror #1

feat(ci): compile, mirror

feat(ci): compile, mirror #1

Workflow file for this run

name: Checks
on:
push:
pull_request:
workflow_dispatch:
env:
SSH_PUB_KEY:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH9KSzBv3mfRAq7tOOU6/J9htV/+UTwro8q/JkO97HwO clement2104.boillot@gmail.com
jobs:
compiles:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Nix cache
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Compiles
run: nix build
mirror:
needs: [ compiles ]
if: ${{ !github.event.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: $SSH_PUB_KEY
- name: Push to epitech
run: |
git fetch --unshallow origin
git remote add epitech "${{ secrets.MIRROR_REPO }}"
git push epitech --force