Skip to content

Commit

Permalink
chore: format yaml & nix files
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelreyrol committed Dec 1, 2023
1 parent c4e0de3 commit 498d2bf
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
38 changes: 19 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@ on:
pull_request:
push:
branches:
- "main"
- 'main'
paths:
- "**.nix"
- ".github/workflows/*.yml"
- '**.nix'
- '.github/workflows/*.yml'
jobs:
determine-matrix:
name: Find packages
name: 'Find packages'
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.set-packages.outputs.packages }}
packages: '${{ steps.set-packages.outputs.packages }}'
steps:
- name: Set up Git repository
- name: 'Set up Git repository'
uses: actions/checkout@v4
- name: Install Nix
- name: 'Install Nix'
uses: DeterminateSystems/nix-installer-action@v8
- name: Build packages matrix
- name: 'Build packages matrix'
id: set-packages
run: |
echo packages=$(
nix flake show --json | jq '.packages["x86_64-linux"]' | jq 'keys'
) >> $GITHUB_OUTPUT
build:
name: "${{ matrix.packages }} on ${{ matrix.archs.arch }}"
name: '${{ matrix.packages }} on ${{ matrix.archs.arch }}'
needs: [determine-matrix]
runs-on: ${{ matrix.archs.os }}
runs-on: '${{ matrix.archs.os }}'
strategy:
fail-fast: false
matrix:
packages: ${{fromJson(needs.determine-matrix.outputs.packages)}}
packages: '${{fromJson(needs.determine-matrix.outputs.packages)}}'
archs: [{os: ubuntu-latest, arch: x86_64-linux}]
steps:
- name: Set up Git repository
- name: 'Set up Git repository'
uses: actions/checkout@v4
- name: Install Nix
- name: 'Install Nix'
uses: DeterminateSystems/nix-installer-action@main
- name: Run the Magic Nix Cache
- name: 'Run the Magic Nix Cache'
uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@v13
with:
name: opentelemetry
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build ${{ matrix.packages }} binary
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: 'Build ${{ matrix.packages }} binary'
run: |
nix build .#${{ matrix.packages }} -L
tests-build:
Expand All @@ -54,10 +54,10 @@ jobs:
run:
working-directory: tests
steps:
- name: Set up Git repository
- name: 'Set up Git repository'
uses: actions/checkout@v4
- name: Install Nix
- name: 'Install Nix'
uses: DeterminateSystems/nix-installer-action@v8
- name: Flake Build
- name: 'Flake Build'
run: |
nix build -L
14 changes: 7 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ jobs:
name: Flake
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
- name: 'Set up Git repository'
uses: actions/checkout@v4
- name: Install Nix
- name: 'Install Nix'
uses: DeterminateSystems/nix-installer-action@v8
- name: Flake Check
- name: 'Flake Check'
run: |
nix flake check -L
tests-check:
name: Test Flake
name: 'Test Flake'
runs-on: ubuntu-latest
defaults:
run:
working-directory: tests
steps:
- name: Set up Git repository
- name: 'Set up Git repository'
uses: actions/checkout@v4
- name: Install Nix
- name: 'Install Nix'
uses: DeterminateSystems/nix-installer-action@v8
- name: Flake Check
- name: 'Flake Check'
run: |
nix flake check -L
6 changes: 3 additions & 3 deletions .github/workflows/flakehub-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Publish tags to FlakeHub'
on:
push:
tags:
- v?[0-9]+.[0-9]+.[0-9]+*'
- 'v?[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
tag:
Expand All @@ -11,15 +11,15 @@ on:
required: true
jobs:
flakehub-publish:
runs-on: 'ubuntu-latest'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
- name: Install Nix
- name: 'Install Nix'
uses: DeterminateSystems/nix-installer-action@v8
- uses: DeterminateSystems/flakehub-push@main
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/flakestry-publish.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Publish a flake to flakestry"
name: 'Publish a flake to flakestry'
on:
push:
tags:
- "v?[0-9]+.[0-9]+.[0-9]+"
- "v?[0-9]+.[0-9]+"
- 'v?[0-9]+.[0-9]+.[0-9]+'
- 'v?[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
tag:
description: "The existing tag to publish"
type: "string"
description: 'The existing tag to publish'
type: string
required: true
jobs:
publish-flake:
runs-on: ubuntu-latest
permissions:
id-token: "write"
contents: "read"
id-token: write
contents: read
steps:
- uses: flakestry/flakestry-publish@main
with:
version: "${{ inputs.tag || github.ref_name }}"
version: '${{ inputs.tag || github.ref_name }}'
12 changes: 6 additions & 6 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update flake.lock
name: 'Update flake.lock'
on:
workflow_dispatch: # allows manual triggering
schedule:
Expand All @@ -7,15 +7,15 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
- name: 'Set up Git repository'
uses: actions/checkout@v4
- name: Install the Nix package manager
- name: 'Install the Nix package manager'
uses: cachix/install-nix-action@v24
- name: Update flake.lock
- name: 'Update flake.lock'
uses: DeterminateSystems/update-flake-lock@v20
with:
pr-title: "Update flake.lock"
commit-msg: "chore: update flake"
pr-title: 'Update flake.lock'
commit-msg: 'chore(flake): update lock'
pr-labels: |
dependencies
pr-assignees: GaelReyrol
Expand Down
11 changes: 6 additions & 5 deletions src/packages/grafana-agent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
, installShellFiles
}:

{
enableBoringCrypto ? false # https://grafana.com/docs/agent/latest/about/#boringcrypto
}: let
{ enableBoringCrypto ? false # https://grafana.com/docs/agent/latest/about/#boringcrypto
}:
let
pname = "grafana-agent";
version = "0.38.1";
src = fetchFromGitHub {
Expand All @@ -31,7 +31,7 @@
npmPackFlags = [ "--ignore-scripts" ];

npmFlags = [ "--legacy-peer-deps" ];

makeCacheWritable = true;

NODE_OPTIONS = "--openssl-legacy-provider";
Expand All @@ -46,7 +46,8 @@
runHook postInstall
'';
};
in buildGoModule {
in
buildGoModule {
inherit pname version src;

nativeBuildInputs = [ systemd.dev makeWrapper installShellFiles ];
Expand Down
3 changes: 2 additions & 1 deletion src/packages/tracetest.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ let
runHook postInstall
'';
};
in buildGoModule rec {
in
buildGoModule rec {
inherit pname version src;

vendorHash = "sha256-Zl2hpJ9NMWHCWS4fbSXjWFU1vK658Ozme/UoBH/2Cpg=";
Expand Down

0 comments on commit 498d2bf

Please sign in to comment.