Compare commits

..

3 Commits

Author SHA1 Message Date
Noah Masur
d0e613f093
try using larger volume for snapshot 2024-05-06 11:19:46 -04:00
Noah Masur
14538d83f5
fix: lost line from workflow 2024-05-06 10:39:00 -04:00
Noah Masur
2d31f5726f
setup s3 cache for aws 2024-05-06 10:38:09 -04:00
3 changed files with 15 additions and 21 deletions

View File

@ -60,22 +60,26 @@ jobs:
# Install Nix
- name: Install Nix
if: inputs.rebuild && inputs.action != 'destroy'
uses: cachix/install-nix-action@v17
uses: cachix/install-nix-action@v20
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
- name: Build Image
if: inputs.rebuild && inputs.action != 'destroy'
run: nix build .#arrow-aws
# # 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
# 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://${{ secrets.NIX_CACHE_BUCKET }} $(readlink result)
rm cache.key
# Installs the Terraform binary and some other accessory functions.
- name: Setup Terraform

View File

@ -75,16 +75,6 @@ jobs:
s3://noahmasur-arrow-images/arrow.iso \
--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.
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2

View File

@ -76,6 +76,6 @@ resource "aws_ami" "image" {
ebs_block_device {
device_name = "/dev/xvda"
snapshot_id = aws_ebs_snapshot_import.image.id
volume_size = 8
volume_size = 17
}
}