Skip to content

Commit

Permalink
feat: simplify std-action
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Jun 28, 2023
1 parent e4b9ae7 commit 1dbe033
Showing 1 changed file with 23 additions and 35 deletions.
58 changes: 23 additions & 35 deletions .github/workflows/std.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ jobs:
flake_url: "."
outputs:
hits: ${{ steps.discovery.outputs.hits }}
nix_conf: ${{ steps.discovery.outputs.nix_conf }}

runs-on: ${{ inputs.runs-on }}
steps:
- name: Install Nix Early (to update subflake references)
uses: nixbuild/nix-quick-install-action@v22
- uses: actions/checkout@v3
- uses: blaggacao/nix-quick-install-action@detect-nix-flake-config
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- uses: actions/checkout@v3
- name: Update subflake references
run: |
# create the store path of
Expand All @@ -43,7 +41,7 @@ jobs:
) &&git add -f flake.lock)
# continue normally ...
- name: Standard Discovery
uses: divnix/std-action/discover@main
uses: divnix/std-action/discover@simplify-std-action
id: discovery

build_cli:
Expand All @@ -56,15 +54,14 @@ jobs:
name: //${{ matrix.target.cell }}/${{ matrix.target.block }}/${{ matrix.target.name }}:${{ matrix.target.action }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: divnix/std-action/run@v0.23.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }}
- uses: blaggacao/nix-quick-install-action@detect-nix-flake-config
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- uses: divnix/std-action/run@simplify-std-action
with:
nix_signing_key: ${{ secrets.NIX_KEY }}
nix_cache: s3://cache.divnix.com?endpoint=fra1.digitaloceanspaces.com
discovery_json: ${{ toJSON(matrix.target) }}
extra_nix_config: ${{ needs.discover.outputs.nix_conf }}

build_packages:
needs: [discover, check_tests]
Expand All @@ -76,15 +73,14 @@ jobs:
name: //${{ matrix.target.cell }}/${{ matrix.target.block }}/${{ matrix.target.name }}:${{ matrix.target.action }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: divnix/std-action/run@v0.23.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }}
- uses: blaggacao/nix-quick-install-action@detect-nix-flake-config
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- uses: divnix/std-action/run@simplify-std-action
with:
nix_signing_key: ${{ secrets.NIX_KEY }}
nix_cache: s3://cache.divnix.com?endpoint=fra1.digitaloceanspaces.com
discovery_json: ${{ toJSON(matrix.target) }}
extra_nix_config: ${{ needs.discover.outputs.nix_conf }}

build_shells:
needs: [discover, check_tests]
Expand All @@ -96,15 +92,14 @@ jobs:
name: //${{ matrix.target.cell }}/${{ matrix.target.block }}/${{ matrix.target.name }}:${{ matrix.target.action }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: divnix/std-action/run@v0.23.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }}
- uses: blaggacao/nix-quick-install-action@detect-nix-flake-config
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- uses: divnix/std-action/run@simplify-std-action
with:
nix_signing_key: ${{ secrets.NIX_KEY }}
nix_cache: s3://cache.divnix.com?endpoint=fra1.digitaloceanspaces.com
discovery_json: ${{ toJSON(matrix.target) }}
extra_nix_config: ${{ needs.discover.outputs.nix_conf }}

check_tests:
needs: discover
Expand All @@ -116,8 +111,7 @@ jobs:
name: //${{ matrix.target.cell }}/${{ matrix.target.block }}/${{ matrix.target.name }}:${{ matrix.target.action }}
runs-on: ${{ inputs.runs-on }}
steps:
- name: Install Nix Early (to update subflake references)
uses: nixbuild/nix-quick-install-action@v22
- uses: blaggacao/nix-quick-install-action@detect-nix-flake-config
with:
nix_conf: |
experimental-features = nix-command flakes
Expand All @@ -136,12 +130,6 @@ jobs:
jq '.nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock
) &&git add -f flake.lock)
# continue normally ...
- uses: divnix/std-action/run@v0.23.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }}
- uses: divnix/std-action/run@simplify-std-action
with:
nix_signing_key: ${{ secrets.NIX_KEY }}
nix_cache: s3://cache.divnix.com?endpoint=fra1.digitaloceanspaces.com
discovery_json: ${{ toJSON(matrix.target) }}
extra_nix_config: ${{ needs.discover.outputs.nix_conf }}

0 comments on commit 1dbe033

Please sign in to comment.