Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/attempt signing release #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/build-and-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ run-name: Demo workflow signing with SignPath
on:
push:
pull_request:
#schedule:
# - cron: '30 3 * * *' # every day at 3:30am UTC
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

jobs:
Expand All @@ -27,6 +25,7 @@ jobs:
run: ./sbom/Create-SBOM.ps1

- name: upload-unsigned-artifact
id: upload-unsigned-artifact
uses: actions/upload-artifact@v4
with:
name: "demo-application"
Expand All @@ -36,17 +35,23 @@ jobs:
.\_BuildResult-unsigned\bom.xml

- name: sign
uses: signpath/github-action-submit-signing-request@v0.3
uses: signpath/github-action-submit-signing-request@v0.4
env:
SIGNPATH_SIGNING_POLICY_SLUG: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && 'release-signing' || 'test-signing' }}
# select release-signing policy for main and release branches
SIGNPATH_SIGNING_POLICY_SLUG: |
${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))
&& 'release-signing'
|| 'test-signing' }}
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '${{ vars.SIGNPATH_ORGANIZATION_ID }}'
project-slug: 'Demo_Application'
signing-policy-slug: '${{ env.SIGNPATH_SIGNING_POLICY_SLUG }}'
github-artifact-name: "demo-application"
# maliciously try to get a release signature from a feature branch
signing-policy-slug: 'release-signing'
github-artifact-id: "${{steps.upload-unsigned-artifact.outputs.artifact-id}}"
wait-for-completion: true
output-artifact-directory: 'demo-application-signed'
github-extended-verification-token: '${{ secrets.EXTENDED_VERIFICATION_TOKEN }}'

- name: upload-signed-artifact
uses: actions/upload-artifact@v4
Expand Down
Loading