GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ArkoseLabs/packer-github-actions: Run HashiCorp Packer as part of your Workflow

This repository was archived by the owner on Feb 16, 2024. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
entrypoint.sh
entrypoint.sh
 
 

Repository files navigation

GitHub Action: Packer

This fork of packer-github-actions replaces the dockerfile to be based on Ubuntu and installs Packer, Ansible and other dependancies. The action now enables the use of the Ansible provisioner in your Packer builds.

GitHub Action for running Packer commands.

Table of Contents

  • GitHub Action: Packer
    • Table of Contents
    • Usage
      • Inputs
        • command
        • arguments
        • target
    • Notes
    • Author Information
    • License

Usage

Add the Action to your GitHub Workflow like so:

---

name: Packer

on:
  push:

jobs:
  packer:
    runs-on: ubuntu-latest
    name: packer

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      # fix backwards incompatibilities in template
      - name: Fix Template
        uses: operatehappy/packer-github-actions@master
        with:
          command: fix

      # validate templates
      - name: Validate Template
        uses: operatehappy/packer-github-actions@master
        with:
          command: validate
          arguments: -syntax-only
          target: artifacts.pkr.json packer.json

      # build artifact
      - name: Build Artifact
        uses: operatehappy/packer-github-actions@master
        with:
          command: build
          arguments: "-color=false -on-error=abort"
          target: artifacts.pkr.json packer.json

      # additional steps to process artifacts

Inputs

Name Description Required Default
command command to execute yes
arguments arguments for command no
target file(s) to target yes artifacts.pkr.json

command

command supports the following subset of Packer CLI commands:

  • build to generate a set of artifacts from a template
  • fix to find and correct backwards incompatible stanzas in a template
  • validate to validate the syntax and configuration of a template

Other CLI commands (console, inspect and version) are technically supported, but have limited utility in a GitHub Actions Workflow, due to their interactive nature.

arguments

arguments supports all options available for the respective command.

The arguments must be provided as a single string. Multiple arguments should be concatenated like so: "-color=false -on-error=abort"

target

target supports a string consisting of one or more file paths:

   # single file
   target: artifacts.pkr.json

   # multiple files, separated by whitespace
   target: artifacts.pkr.json packer.json

The Action will iterate over each file and run each command, separately.

Notes

  • To enable debug logging, create a secret named ACTIONS_STEP_DEBUG with the value true. See here for more information.

Author Information

This module is maintained by the contributors listed on GitHub.

Development of this module was sponsored by Operate Happy.

License

Licensed under the Apache License, Version 2.0 (the "License").

You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" basis, without WARRANTIES or conditions of any kind, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

About

Run HashiCorp Packer as part of your Workflow

github.com/marketplace/actions/packer-github-actions

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.