Skip to content

Commit

Permalink
fix filename
Browse files Browse the repository at this point in the history
  • Loading branch information
AEnguerrand committed Dec 4, 2024
1 parent 22e156a commit 8f7a833
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/slsa-generator-nodejs-custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ jobs:
id: package-details
run: |
PACKAGE_PATH=$(ls -1 *.tgz | head -n 1) # To be change with the action as input
PACKAGE_TGZ=$(basename $PACKAGE_PATH)
PACKAGE_FILENAME=$(basename $PACKAGE_PATH)
PACKAGE_NAME=$(jq -r '.name' package.json)
PACKAGE_VERSION=$(jq -r '.version' package.json)
PACKAGE_INTEGRITY=$(shasum -a 512 $PACKAGE_PATH | awk '{print $1}')
echo "PACKAGE_TGZ=${PACKAGE_TGZ}" >> $GITHUB_OUTPUT
echo "PACKAGE_FILENAME=${PACKAGE_FILENAME}" >> $GITHUB_OUTPUT
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT
echo "PACKAGE_INTEGRITY=sha512-${PACKAGE_INTEGRITY}" >> $GITHUB_OUTPUT
- name: Print all outputs of packges details
run: |
echo "PACKAGE_TGZ=${{ steps.package-details.outputs.PACKAGE_TGZ }}"
echo "PACKAGE_FILENAME=${{ steps.package-details.outputs.PACKAGE_FILENAME }}"
echo "PACKAGE_NAME=${{ steps.package-details.outputs.PACKAGE_NAME }}"
echo "PACKAGE_VERSION=${{ steps.package-details.outputs.PACKAGE_VERSION }}"
echo "PACKAGE_INTEGRITY=${{ steps.package-details.outputs.PACKAGE_INTEGRITY }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slsa-github-generator-nodejs-layout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ digest=$(echo "${integrity_digest}" | cut -d'-' -f2- | base64 -d | od -A n -v -t

# NOTE: the name of the attestation should be configurable.
filename=${PACKAGE_FILENAME:-}
attestation_name="toto"
attestation_name="${filename%.*}"
cat <<EOF | jq | tee "${SLSA_OUTPUTS_ARTIFACTS_FILE}"
{
"version": 1,
Expand Down

0 comments on commit 8f7a833

Please sign in to comment.