mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
setup s3 cache for aws
This commit is contained in:
parent
f4ed3f0ec6
commit
2d31f5726f
23
.github/workflows/arrow-aws.yml
vendored
23
.github/workflows/arrow-aws.yml
vendored
@ -60,22 +60,25 @@ jobs:
|
|||||||
# Install Nix
|
# Install Nix
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
if: inputs.rebuild && inputs.action != 'destroy'
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
uses: cachix/install-nix-action@v17
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
substituters = s3://${{ secrets.NIX_CACHE_BUCKET }} https://cache.nixos.org/
|
||||||
|
trusted-public-keys = ${{ secrets.NIX_CACHE_BUCKET }}:KJLT83NgyLjjX+YOJxFNflmw3/IPwW+y21cpgVv+Kwc= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||||
|
|
||||||
# Build the image
|
# Build the image
|
||||||
- name: Build Image
|
- name: Build Image
|
||||||
if: inputs.rebuild && inputs.action != 'destroy'
|
if: inputs.rebuild && inputs.action != 'destroy'
|
||||||
run: nix build .#arrow-aws
|
run: nix build .#arrow-aws
|
||||||
|
|
||||||
# # Copy the image to S3
|
# Copy the image to S3
|
||||||
# - name: Upload Image to Cache
|
- name: Upload Image to Cache
|
||||||
# env:
|
env:
|
||||||
# NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
||||||
# run: |
|
run: |
|
||||||
# echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
||||||
# nix store sign --key-file cache.key $(readlink result)
|
nix store sign --key-file cache.key $(readlink result)
|
||||||
# nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
nix copy --to s3://${{ secrets.NIX_CACHE_BUCKET }} $(readlink result)
|
||||||
# rm cache.key
|
rm cache.key
|
||||||
|
|
||||||
# Installs the Terraform binary and some other accessory functions.
|
# Installs the Terraform binary and some other accessory functions.
|
||||||
- name: Setup Terraform
|
- name: Setup Terraform
|
||||||
|
10
.github/workflows/arrow.yml
vendored
10
.github/workflows/arrow.yml
vendored
@ -75,16 +75,6 @@ jobs:
|
|||||||
s3://noahmasur-arrow-images/arrow.iso \
|
s3://noahmasur-arrow-images/arrow.iso \
|
||||||
--endpoint-url "https://${{ env.CLOUDFLARE_R2_ENDPOINT }}"
|
--endpoint-url "https://${{ env.CLOUDFLARE_R2_ENDPOINT }}"
|
||||||
|
|
||||||
# # Copy the image to S3
|
|
||||||
# - name: Upload Image to Cache
|
|
||||||
# env:
|
|
||||||
# NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
|
||||||
# run: |
|
|
||||||
# echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
|
||||||
# nix store sign --key-file cache.key $(readlink result)
|
|
||||||
# nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
|
||||||
# rm cache.key
|
|
||||||
|
|
||||||
# Installs the Terraform binary and some other accessory functions.
|
# Installs the Terraform binary and some other accessory functions.
|
||||||
- name: Setup Terraform
|
- name: Setup Terraform
|
||||||
uses: hashicorp/setup-terraform@v2
|
uses: hashicorp/setup-terraform@v2
|
||||||
|
Loading…
Reference in New Issue
Block a user