Skip to content

Commit

Permalink
Merge pull request #403 from jmpsec/fixes-uploaded-deb-release
Browse files Browse the repository at this point in the history
Fix for deb package name in tagged release
  • Loading branch information
javuto authored Feb 12, 2024
2 parents 6a82a4e + cbeedb7 commit ca5c0be
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/actions/build/dpkg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -53,22 +56,22 @@ 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
with:
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.<commit_sha>
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

0 comments on commit ca5c0be

Please sign in to comment.