mirror of
https://github.com/input-output-hk/foliage.git
synced 2024-11-22 02:53:41 +03:00
parent
acecf00811
commit
677fb75ee5
16
.github/actions/nix-setup/action.yml
vendored
Normal file
16
.github/actions/nix-setup/action.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Nix setup
|
||||
description: Installs and configures nix and related tools
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@v9
|
||||
with:
|
||||
github-token: ${{ env.GITHUB_TOKEN }}
|
||||
extra-conf: accept-flake-config = true
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: foliage
|
||||
authToken: ${{ env.CACHIX_AUTH_TOKEN }}
|
38
.github/workflows/nix.yml
vendored
38
.github/workflows/nix.yml
vendored
@ -13,20 +13,8 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v4
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: foliage
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
||||
- run: nix develop --accept-flake-config --command fourmolu -m check .
|
||||
- uses: ./.github/actions/nix-setup
|
||||
- run: nix develop --command fourmolu -m check .
|
||||
|
||||
build:
|
||||
runs-on:
|
||||
@ -34,19 +22,9 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v4
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: foliage
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
||||
- run: nix build --accept-flake-config
|
||||
|
||||
- run: nix build --accept-flake-config .#checks.x86_64-linux.foliage:test:foliage-test-suite
|
||||
- uses: ./.github/actions/nix-setup
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||
- run: nix build
|
||||
- run: nix build --print-build-logs .#checks.x86_64-linux.foliage:test:foliage-test-suite
|
||||
|
30
.github/workflows/update-flake-lock.yml
vendored
30
.github/workflows/update-flake-lock.yml
vendored
@ -3,34 +3,22 @@ name: update-flake-lock
|
||||
on:
|
||||
workflow_dispatch: # allows manual triggering
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
|
||||
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00
|
||||
|
||||
jobs:
|
||||
lockfile:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/nix-setup
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v4
|
||||
- uses: DeterminateSystems/update-flake-lock@v20
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: foliage
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
||||
- name: Update flake.lock
|
||||
uses: DeterminateSystems/update-flake-lock@v16
|
||||
with:
|
||||
pr-title: "Update flake.lock" # Title of PR to be created
|
||||
pr-labels: | # Labels to be set on the PR
|
||||
# Title of PR to be created
|
||||
pr-title: "Update flake.lock"
|
||||
# Labels to be set on the PR
|
||||
pr-labels: |
|
||||
dependencies
|
||||
automated
|
||||
|
||||
- name: Print PR number
|
||||
run: echo Opened pull request ${{ steps.update.outputs.pull-request-number }}.
|
||||
- run: echo Opened pull request ${{ steps.update.outputs.pull-request-number }}.
|
||||
|
Loading…
Reference in New Issue
Block a user