{"id":15801327,"url":"https://github.com/dawitnida/packer-github-actions","last_synced_at":"2025-04-21T08:31:37.139Z","repository":{"id":85632154,"uuid":"179445039","full_name":"dawitnida/packer-github-actions","owner":"dawitnida","description":"Unofficial Packer GitHub Actions","archived":false,"fork":false,"pushed_at":"2020-10-27T22:05:07.000Z","size":595,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T01:21:50.630Z","etag":null,"topics":["build","github","github-action","github-actions","hashicorp","inspect","packer","packer-builder","packer-template","validate"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dawitnida.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-04T07:28:48.000Z","updated_at":"2024-05-06T23:02:44.000Z","dependencies_parsed_at":"2023-03-09T16:45:17.167Z","dependency_job_id":null,"html_url":"https://github.com/dawitnida/packer-github-actions","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawitnida%2Fpacker-github-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawitnida%2Fpacker-github-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawitnida%2Fpacker-github-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawitnida%2Fpacker-github-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dawitnida","download_url":"https://codeload.github.com/dawitnida/packer-github-actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250023505,"owners_count":21362414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","github","github-action","github-actions","hashicorp","inspect","packer","packer-builder","packer-template","validate"],"created_at":"2024-10-05T01:21:46.712Z","updated_at":"2025-04-21T08:31:36.874Z","avatar_url":"https://github.com/dawitnida.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packer Github Actions\n\nThese is unofficial Packer [GitHub Actions][github-actions] which allows you to run packer validation and inspection on \npull requests to review Packer template changes and potentially build on pull merge.\nCheck out the [official Packer documentation][packer-doc] for further reference. \n\n\n### DONE\n\n- Documentations\n    - [x] Getting started \u0026 usage\n    - [x] Actions details\n- Action for \n    - [x] Validate Action\n    - [x] Inspect Action\n    - [x] Build Action\n    - [x] Directory set for all actions\n    \n### TODOs\n- Improvements\n    - [ ] Multiple template validation\n    - [ ] Documentation with more screen shots \u0026 configuration instructions\n    - [ ] Blog post\n\n\n### Getting started and usage\n\nTo check this in action, please check [Packer actions demo project][packer-actions-demo] with a collection\nof sample packer template files. \n\nVariables \n\n- `PACKER_ACTION_WORKING_DIR` : Working directory\n- `TEMPLATE_FILE_NAME` : Packer template file\n- `ACTION_COMMENT` : Enable/Disable PR comment from validate result\n\n```\nname: Validate packer template file in a directory\n\non:\n  pull_request:\njobs:\n  packer_validate:\n    runs-on: hashicorp/packer:1.6.4\n    steps:\n      - name: Packer validate template-y without argument\n        uses: dawitnida/packer-github-actions/validate@master\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          TEMPLATE_FILE_NAME: ${{ env.TEMPLATE_FILE_NAME }}\n```\n\n```\nworkflow \"packer build template-y\" {\n  resolves = \"packer-build-template-y\"\n  on = \"release\"\n}\n\naction \"packer-build-template-y\" {\n  uses = \"dawitnida/packer-github-actions/build@master\"\n  needs = \"packer-inspect-template-y\"\n  secrets = [\n    \"GITHUB_TOKEN\",\n  ]\n  env = {\n    TEMPLATE_FILE_NAME = \"packer-template-y.json\"\n  }\n}\n\naction \"filter-open-synced-pr\" {\n  uses = \"actions/bin/filter@master\"\n  args = \"action 'opened|synchronize'\"\n}\n\nworkflow \"packer inspect \u0026 validate template-y\" {\n  resolves = \"packer-inspect-template-y\"\n  on = \"pull_request\"\n}\n\naction \"packer-validate-template-y\" {\n  uses = \"dawitnida/packer-github-actions/validate@master\"\n  needs = \"filter-open-synced-pr\"\n  secrets = [\n    \"GITHUB_TOKEN\",\n  ]\n  env = {\n    TEMPLATE_FILE_NAME = \"packer-template-y.json\"\n  }\n}\n\naction \"packer-inspect-template-y\" {\n  uses = \"dawitnida/packer-github-actions/inspect@master\"\n  needs = \"packer-validate-template-y\"\n  secrets = [\n    \"GITHUB_TOKEN\",\n  ]\n  env = {\n    TEMPLATE_FILE_NAME = \"packer-template-y.json\"\n  }\n}\n```\n\n**Figure 1.** *Packer validate complete check list diagram*\n![checks-list-diagram](media/action-results.png)\n\n### Author\n[Dawit Nida](https://github.com/dawitnida)\n\n[packer-actions-demo]:  \u003chttps://github.com/dawitnida/packer-actions-demo\u003e\n[github-actions]:       \u003chttps://github.com/features/actions\u003e\n[packer-doc]:           \u003chttps://www.packer.io/docs/index.html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawitnida%2Fpacker-github-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdawitnida%2Fpacker-github-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawitnida%2Fpacker-github-actions/lists"}