image: "alpine"

prelude:
  - apk add git
  - |
    PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \
    git clone https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git && cd {{.Values.name}} && git checkout v"${PACKAGE_VERSION}"

steps:
  - mkdir -p /package/usr/lib/dracut/modules.d
  - mkdir -p /package/etc/dracut.conf.d/
  - cp -r {{.Values.name}}/dracut/28immucore /package/usr/lib/dracut/modules.d/28immucore
  - cp {{.Values.name}}/dracut/*.conf /package/etc/dracut.conf.d/

env:
  - GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}

package_dir: "/package"