From 3f820190fb921ab452a08d4abbadb50b5698e0fe Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 May 2024 12:42:23 -0500 Subject: [PATCH 1/6] remove quotes --- garasign/gpg-sign/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/garasign/gpg-sign/action.yml b/garasign/gpg-sign/action.yml index e8c4dc6..83001f1 100644 --- a/garasign/gpg-sign/action.yml +++ b/garasign/gpg-sign/action.yml @@ -54,5 +54,5 @@ runs: -v $(pwd):$(pwd) \ -w $(pwd) \ ${{ inputs.artifactory_registry }}/${{ inputs.artifactory_image }} \ - /bin/bash -c 'gpgloader && for filename in "${{ inputs.filenames }}"; do gpg --detach-sign --armor --output ${filename}.sig ${filename}; done' + /bin/bash -c 'gpgloader && for filename in ${{ inputs.filenames }}; do gpg --detach-sign --armor --output ${filename}.sig ${filename}; done' shell: bash From b45171f05c44a954b35804f8dae3edbea0a11168 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 May 2024 12:56:19 -0500 Subject: [PATCH 2/6] update papertrail --- garasign/gpg-sign/action.yml | 2 +- papertrail/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/garasign/gpg-sign/action.yml b/garasign/gpg-sign/action.yml index 83001f1..d9440e3 100644 --- a/garasign/gpg-sign/action.yml +++ b/garasign/gpg-sign/action.yml @@ -2,7 +2,7 @@ name: "Sign artifact using garasign" description: "Signs a release artifact" inputs: filenames: - description: "File names to sign, space separated" + description: "File name(s) to sign, can be a glob pattern" required: true garasign_username: description: "Garasign username" diff --git a/papertrail/action.yml b/papertrail/action.yml index 4afdea1..d0705f9 100644 --- a/papertrail/action.yml +++ b/papertrail/action.yml @@ -8,7 +8,7 @@ inputs: description: "The release version. If not provided, the github.ref_name variable will be used" required: false filenames: - description: "Artifact filenames to include in the report, space-separated" + description: "Artifact filename(s) to include in the report, can be a glob pattern" required: true token: description: "The GitHub token for the action" From e89c8a6689b432981459de11bae5d25eef02f07e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 May 2024 12:56:32 -0500 Subject: [PATCH 3/6] update papertrail --- papertrail/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papertrail/action.yml b/papertrail/action.yml index d0705f9..b83d4c7 100644 --- a/papertrail/action.yml +++ b/papertrail/action.yml @@ -35,7 +35,7 @@ runs: echo "Releaser: $NAME" >> $PAPERTRAIL echo "Build Source: GitHub Actions" echo "Build Number: ${{ github.run_id }}" - for filename in"${{ inputs.filenames }}"; do + for filename in ${{ inputs.filenames }}; do SHA=$(shasum -a 256 $filename | awk '{print $1;}') echo "Filename: $filename" >> $PAPERTRAIL echo "Shasum: $SHA" >> $PAPERTRAIL From 29cfc0a880e5ab83b42bb749a92fd2c215829ee4 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 May 2024 13:23:07 -0500 Subject: [PATCH 4/6] cleanup --- README.md | 4 ++-- papertrail/action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ea467b..7bc79b9 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ You can also supply multiple space-separated filenames to sign a list of files: - name: "Create detached signature" uses: mongodb/drivers-github-tools/garasign/gpg-sign@main with: - filenames: somefile.ext someotherfile.txt + filenames: dist/* garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }} garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }} artifactory_username: ${{ secrets.ARTIFACTORY_USER }} @@ -87,6 +87,6 @@ By default it will create a "papertrail.txt" file in the current directory. with: product_name: Mongo Python Driver release_version: ${{ github.ref_name }} - filenames: $DIST_FILES + filenames: dist/* token: ${{ github.token }} ``` diff --git a/papertrail/action.yml b/papertrail/action.yml index b83d4c7..da5fba9 100644 --- a/papertrail/action.yml +++ b/papertrail/action.yml @@ -15,7 +15,7 @@ inputs: required: true output: description: "The output filename" - default: "papertail.txt" + default: "papertrail.txt" runs: using: composite From db2f94f8a0edb8fd7d30abd0fa52d6e9f7a5c24e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 May 2024 16:39:49 -0500 Subject: [PATCH 5/6] require version --- papertrail/action.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/papertrail/action.yml b/papertrail/action.yml index da5fba9..e06667a 100644 --- a/papertrail/action.yml +++ b/papertrail/action.yml @@ -5,8 +5,8 @@ inputs: description: "Name of product" required: true release_version: - description: "The release version. If not provided, the github.ref_name variable will be used" - required: false + description: "The release version" + required: true filenames: description: "Artifact filename(s) to include in the report, can be a glob pattern" required: true @@ -26,12 +26,8 @@ runs: export GH_TOKEN=${{ inputs.token }} NAME=$(gh api users/${{ github.actor }} --jq '.name') export PAPERTRAIL="${{ inputs.output }}" - export VERSION="${{ github.ref_name }}" - if [ -n "${{ inputs.release_version }}" ]; then - export VERSION="${{ inputs.release_version }}" - fi echo "Product: ${{ inputs.product_name }}" > $PAPERTRAIL - echo "Version: $VERSION" >> $PAPERTRAIL + echo "Version: ${{ inputs.version }}" >> $PAPERTRAIL echo "Releaser: $NAME" >> $PAPERTRAIL echo "Build Source: GitHub Actions" echo "Build Number: ${{ github.run_id }}" From a91280fc08a14e1b6ab9b16b6fadeb24708f6ba9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 May 2024 17:01:51 -0500 Subject: [PATCH 6/6] fix name --- papertrail/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papertrail/action.yml b/papertrail/action.yml index e06667a..9df1888 100644 --- a/papertrail/action.yml +++ b/papertrail/action.yml @@ -27,7 +27,7 @@ runs: NAME=$(gh api users/${{ github.actor }} --jq '.name') export PAPERTRAIL="${{ inputs.output }}" echo "Product: ${{ inputs.product_name }}" > $PAPERTRAIL - echo "Version: ${{ inputs.version }}" >> $PAPERTRAIL + echo "Version: ${{ inputs.release_version }}" >> $PAPERTRAIL echo "Releaser: $NAME" >> $PAPERTRAIL echo "Build Source: GitHub Actions" echo "Build Number: ${{ github.run_id }}"