diff --git a/.github/workflows/ami.yml b/.github/workflows/ami.yml index ce4c784..e397920 100644 --- a/.github/workflows/ami.yml +++ b/.github/workflows/ami.yml @@ -8,8 +8,6 @@ jobs: contents: read id-token: write environment: images - env: - FLAKE_REF: "github:${{ github.repository }}/${{ github.ref }}" steps: - uses: DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e # v9 - uses: DeterminateSystems/magic-nix-cache-action@eeabdb06718ac63a7021c6132129679a8e22d0c7 # v3 @@ -17,9 +15,10 @@ jobs: with: aws-region: eu-north-1 role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/upload-ami - - run: nix build ${{ env.FLAKE_REF }}#legacyAmazonImage + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - run: | - file="$(jq '.file' < ./result/nix-support/image-info.json)" - nix run --inputs-from ${{ env.FLAKE_REF }} nixpkgs#coldsnap -- upload --no-progress "$file" + nix build .#legacyAmazonImage + file="$(jq -r '.file' < ./result/nix-support/image-info.json)" + nix run --inputs-from . nixpkgs#coldsnap -- upload --no-progress "$file"