mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 22:00:14 +00:00
switch to uploading image to s3 without tf
This commit is contained in:
17
.github/workflows/arrow-aws.yml
vendored
17
.github/workflows/arrow-aws.yml
vendored
@ -67,25 +67,18 @@ jobs:
|
||||
- name: Install Nix
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
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 }}
|
||||
- name: Upload Image to S3
|
||||
if: inputs.rebuild && inputs.action != 'destroy'
|
||||
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
|
||||
aws s3 cp \
|
||||
result/nixos-amazon-image-*.vhd \
|
||||
s3://${{ secrets.IMAGES_BUCKET }}/arrow.vhd \
|
||||
|
||||
# Installs the Terraform binary and some other accessory functions.
|
||||
- name: Setup Terraform
|
||||
|
Reference in New Issue
Block a user