Skip to content

Commit

Permalink
feat(ci): compile, mirror
Browse files Browse the repository at this point in the history
if it compiles it works
  • Loading branch information
drawbu committed Mar 21, 2024
1 parent f42c7d4 commit ff88851
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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

0 comments on commit ff88851

Please sign in to comment.