-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Actions and Add Python-Specific Actions (#6)
- Loading branch information
Showing
12 changed files
with
412 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Authorized Publication | ||
description: Generate report for authorized publication on distribution channels | ||
inputs: | ||
product_name: | ||
description: Name of product | ||
required: true | ||
release_version: | ||
description: The release version | ||
required: true | ||
filenames: | ||
description: Artifact filename(s) to include in the report, can be a glob pattern | ||
required: true | ||
token: | ||
description: The GitHub token for the action | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Prepare report | ||
shell: bash | ||
run: | | ||
export GH_TOKEN=${{ inputs.token }} | ||
NAME=$(gh api users/${{ github.actor }} --jq '.name') | ||
export REPORT=$S3_ASSETS/authorized_publication.txt | ||
echo "Product: ${{ inputs.product_name }}" > $REPORT | ||
echo "Version: ${{ inputs.release_version }}" >> $REPORT | ||
echo "Releaser: $NAME" >> $REPORT | ||
echo "Build Source: GitHub Actions" | ||
echo "Build Number: ${{ github.run_id }}" | ||
for filename in ${{ inputs.filenames }}; do | ||
SHA=$(shasum -a 256 $filename | awk '{print $1;}') | ||
echo "Filename: $filename" >> $REPORT | ||
echo "Shasum: $SHA" >> $REPORT | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Run git actions in a signing container" | ||
description: "Allows running arbitrary git actions in a container with GPG keys loaded" | ||
inputs: | ||
command: | ||
description: "Command to run inside the container" | ||
required: true | ||
artifactory_image: | ||
description: "Image to use for artifactory" | ||
default: release-tools-container-registry-local/garasign-git | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: "Run git command" | ||
run: | | ||
podman run \ | ||
--env-file=$GARASIGN_ENVFILE \ | ||
--rm \ | ||
-v $(pwd):$(pwd) \ | ||
-w $(pwd) \ | ||
${ARTIFACTORY_REGISTRY}/${{ inputs.artifactory_image }} \ | ||
/bin/bash -c "gpgloader && ${{ inputs.command }}" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Sign artifact(s) using garasign" | ||
description: "Signs release artifact(s)" | ||
inputs: | ||
filenames: | ||
description: "File name(s) to sign, can be a glob pattern" | ||
required: true | ||
artifactory_image: | ||
description: "Image to use for artifactory" | ||
default: release-tools-container-registry-local/garasign-gpg | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: "Create detached signature for file" | ||
shell: bash | ||
run: | | ||
podman run \ | ||
--env-file=$GARASIGN_ENVFILE \ | ||
--rm \ | ||
-v $(pwd):$(pwd) \ | ||
-w $(pwd) \ | ||
${ARTIFACTORY_REGISTRY}/${{ inputs.artifactory_image }} \ | ||
/bin/bash -c 'gpgloader && for filename in ${{ inputs.filenames }}; do gpg --detach-sign --armor --output ${filename}.sig ${filename}; done' | ||
- name: "Move the signature files to the release directory" | ||
shell: bash | ||
run: | | ||
mv ${{inputs.filenames}}.sig $RELEASE_ASSETS |
Oops, something went wrong.