Skip to content

Commit

Permalink
Fix cleanup race condition between AWS architectures (#76)
Browse files Browse the repository at this point in the history
Signed-off-by: peterdeme <snypox@gmail.com>
  • Loading branch information
peterdeme authored Jan 20, 2025
1 parent 8850b81 commit 4676277
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ jobs:
run: packer init aws.pkr.hcl

- name: Build the AWS AMI using Packer (${{ matrix.arch }})
run: packer build aws.pkr.hcl
# We only run the cleanup postprocessor for one of them, to avoid race conditions
run: packer build aws.pkr.hcl ${{ matrix.arch == 'x86_64' && '--except=amazon-ami-management' || '' }}
env:
PKR_VAR_encrypt_boot: false
PKR_VAR_ami_name_prefix: spacelift-${{ needs.timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -93,7 +94,8 @@ jobs:
run: packer init aws.pkr.hcl

- name: Build the GovCloud AWS AMI using Packer (${{ matrix.arch }})
run: packer build aws.pkr.hcl
# We only run the cleanup postprocessor for one of them, to avoid race conditions
run: packer build aws.pkr.hcl ${{ matrix.arch == 'x86_64' && '--except=amazon-ami-management' || '' }}
env:
PKR_VAR_source_ami_owners: '["045324592363"]'
PKR_VAR_region: us-gov-east-1
Expand Down

0 comments on commit 4676277

Please sign in to comment.