mirror of
https://github.com/dokku/dokku.git
synced 2025-12-15 19:47:42 +01:00
tests: lint the packer config in CI
This commit is contained in:
15
.github/workflows/lint.yml
vendored
15
.github/workflows/lint.yml
vendored
@@ -34,6 +34,21 @@ jobs:
|
||||
config: '.github/linters/.markdown-lint.yml'
|
||||
args: './README.md'
|
||||
|
||||
packer:
|
||||
name: packer
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup packer
|
||||
uses: hashicorp/setup-packer@main
|
||||
with:
|
||||
version: latest
|
||||
- name: Run packer init
|
||||
run: "make image/init/digitalocean"
|
||||
- name: Run `packer validate`
|
||||
run: "make image/validate/digitalocean"
|
||||
|
||||
shellcheck:
|
||||
name: shellcheck
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
11
package.mk
11
package.mk
@@ -1,3 +1,7 @@
|
||||
ifndef PKR_VAR_dokku_version
|
||||
PKR_VAR_dokku_version = $(shell grep Version debian/control | cut -d' ' -f2)
|
||||
endif
|
||||
|
||||
/tmp/build-dokku/var/lib/dokku/GIT_REV:
|
||||
mkdir -p /tmp/build-dokku
|
||||
mkdir -p /tmp/build-dokku/usr/share/bash-completion/completions
|
||||
@@ -31,3 +35,10 @@ ifdef DOKKU_GIT_REV
|
||||
else
|
||||
git rev-parse HEAD > /tmp/build-dokku/var/lib/dokku/GIT_REV
|
||||
endif
|
||||
.PHONY: image/init/digitalocean
|
||||
image/init/digitalocean:
|
||||
packer init contrib/images/digitalocean/packer.pkr.hcl
|
||||
|
||||
.PHONY: image/validate/digitalocean
|
||||
image/validate/digitalocean:
|
||||
packer validate -var 'dokku_version=${PKR_VAR_dokku_version}' contrib/images/digitalocean/packer.pkr.hcl
|
||||
|
||||
Reference in New Issue
Block a user