From cbeedb71864f80bc4497c859b6aa006d3bc1c691 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Mon, 12 Feb 2024 19:16:02 +0100 Subject: [PATCH] Fix for deb package name in tagged release --- .github/actions/build/dpkg/action.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/actions/build/dpkg/action.yml b/.github/actions/build/dpkg/action.yml index 9c4e83b6..c7e15001 100644 --- a/.github/actions/build/dpkg/action.yml +++ b/.github/actions/build/dpkg/action.yml @@ -13,6 +13,9 @@ inputs: commit_sha: required: true description: Define the SHA1 git commit hash + release_version_tag: + required: true + description: Define the release version osquery_version: required: false description: Define the version of Osquery for schema @@ -37,7 +40,7 @@ runs: shell: "bash" run: ./deploy/cicd/deb/generate-deb-package.sh env: - OSCTRL_COMPONTENT: ${{ inputs.osctrl_component }} + OSCTRL_COMPONENT: ${{ inputs.osctrl_component }} GOOS: ${{ inputs.go_os }} GOARCH: ${{ inputs.go_arch }} COMMIT_SHA: ${{ inputs.commit_sha }} @@ -53,7 +56,7 @@ runs: maintainer: jmpsec/osctrl version: ${{ github.ref }} # refs/tags/v*.*.* arch: ${{ inputs.go_arch }} - desc: "DEB package for osctrl-${OSCTRL_COMPONTENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}" + desc: "DEB package for osctrl-${OSCTRL_COMPONENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}" - name: Create DEB package contents uses: jiro4989/build-deb-action@v2 @@ -61,14 +64,14 @@ runs: package: osctrl-${{ inputs.osctrl_component }} package_root: ".debpkg-osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}" maintainer: jmpsec/osctrl - version: v0.0.${{ inputs.commit_sha }} # 0.0. + version: ${{ inputs.commit_sha }} arch: ${{ inputs.go_arch }} - desc: "DEB package for osctrl-${OSCTRL_COMPONTENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}" + desc: "DEB package for osctrl-${OSCTRL_COMPONENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}" ########################### Upload DEBs ########################### - name: Upload osctrl DEBs uses: actions/upload-artifact@v3 with: - name: osctrl-${{ inputs.osctrl_component }}_0.0.${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb - path: osctrl-${{ inputs.osctrl_component }}_0.0.${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb + name: osctrl-${{ inputs.osctrl_component }}_${{ inputs.release_version_tag }}-${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb + path: osctrl-${{ inputs.osctrl_component }}_${{ inputs.release_version_tag }}-${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb retention-days: 10