From c5e8e3d9956d83bbb06dc9f7f0dfaf7bc0a8c94a Mon Sep 17 00:00:00 2001 From: jamesbeedy Date: Thu, 25 Jan 2024 20:23:41 +0000 Subject: [PATCH] try using full path --- .github/workflows/build-and-publish-image.yaml | 2 +- democluster/democluster.pkr.hcl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yaml b/.github/workflows/build-and-publish-image.yaml index 2d1bb0a..762d2d5 100644 --- a/.github/workflows/build-and-publish-image.yaml +++ b/.github/workflows/build-and-publish-image.yaml @@ -45,5 +45,5 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: 'us-west-2' # optional: defaults to us-east-1 - SOURCE_DIR: '/opt/actions-runner/_work/democluster/democluster/democluster' # optional: defaults to entire repository + SOURCE_DIR: '/opt/actions-runner/_work/democluster/democluster/final' # optional: defaults to entire repository DEST_DIR: "cloud-images/democluster/latest" diff --git a/democluster/democluster.pkr.hcl b/democluster/democluster.pkr.hcl index bf822b1..5e54789 100644 --- a/democluster/democluster.pkr.hcl +++ b/democluster/democluster.pkr.hcl @@ -117,9 +117,10 @@ build { post-processor "shell-local" { inline = [ - "cp output-stage0/packer-stage0 democluster.img", + "mkdir final + "cp output-stage0/packer-stage0 final/democluster.img", "rm -rf output-stage0/", - "chmod 777 democluster.img", + "chmod -R 777 final", ] } }