Skip to content

Commit

Permalink
updates examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ksatirli committed Apr 23, 2024
1 parent 638438e commit e1044aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions examples/hcp-packer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@ jobs:
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: "latest"

- name: Run `packer init`
id: init
run: "packer init ./image.pkr.hcl"

- name: Run `packer validate`
id: validate
run: "packer validate ./image.pkr.hcl"

- name: Build Artifact
run: packer build -color=false -on-error=abort image.pkr.hcl
run: "packer build -color=false -on-error=abort image.pkr.hcl"
env:
HCP_CLIENT_ID: ${{ secrets.HCP_CLIENT_ID }}
HCP_CLIENT_SECRET: ${{ secrets.HCP_CLIENT_SECRET }}
Expand Down
7 changes: 4 additions & 3 deletions test/hello-world.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# file: builds.pkr.hcl
source "file" "basic-example" {
source "file" "basic_example" {
content = "Lorem ipsum dolor sit amet"
target = "sample_artifact"
}
Expand All @@ -26,6 +26,7 @@ Some nice description about the image which artifact is being published to HCP P
}
}

sources = ["sources.file.basic-example"]
sources = [
"sources.file.basic-example"
]
}

0 comments on commit e1044aa

Please sign in to comment.