-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(cli): context by environment #148
Changes from 4 commits
f1949f4
59fd47e
12c0f1f
c2b5e37
f82f4a0
40367c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,44 @@ | ||||||
name: Integration Tests | ||||||
|
||||||
on: | ||||||
workflow_dispatch: | ||||||
|
||||||
jobs: | ||||||
smoke-tests: | ||||||
permissions: | ||||||
contents: read | ||||||
runs-on: ${{ matrix.os }} | ||||||
strategy: | ||||||
fail-fast: false | ||||||
matrix: | ||||||
os: [ubuntu-latest, macos-latest, windows-latest] | ||||||
steps: | ||||||
- | ||||||
name: Checkout | ||||||
uses: actions/checkout@v2 | ||||||
- | ||||||
name: Create artifacts | ||||||
run: | | ||||||
mkdir artifacts | ||||||
echo "onion, tomato, jalapeno, cilantro, lime, salt" > artifacts/salsa.txt | ||||||
echo "audi, tesla, bmw" > artifacts/cars.txt | ||||||
- | ||||||
name: Generate some extra materials (this usually happens as part of the build process) | ||||||
run: | | ||||||
echo '[{"uri": "pkg:deb/debian/[email protected]?arch=amd64", "digest": {"sha256": "e1731ae217fcbc64d4c00d707dcead45c828c5f762bcf8cc56d87de511e096fa"}}]' > artifacts/extra-materials.json | ||||||
- | ||||||
name: Install cosign | ||||||
uses: sigstore/[email protected] | ||||||
with: | ||||||
cosign-release: 'v1.5.1' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumped cosign yesterday.
Suggested change
|
||||||
- | ||||||
name: Generate provenance from artifacts | ||||||
uses: phillips/[email protected] | ||||||
with: | ||||||
command: generate | ||||||
subcommand: files | ||||||
arguments: --artifact-path artifacts --extra-materials artifacts/extra-materials.json --output-path provenance.json | ||||||
env: | ||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,15 +40,8 @@ runs: | |
id: compose-args | ||
shell: bash | ||
run: | | ||
encoded_github="$(echo ${GITHUB_CONTEXT} | base64 -w 0)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please do note we have added base64 encoding due to an earlier bug that broke the json due to a commit message with quotes inside. #116 Could you confirm this isn't reintroducing that issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably a |
||
encoded_runner="$(echo ${RUNNER_CONTEXT} | base64 -w 0)" | ||
|
||
args=(${{ inputs.command }}) | ||
args+=(${{ inputs.subcommand }}) | ||
args+=(--github-context) | ||
args+=("${encoded_github}") | ||
args+=(--runner-context) | ||
args+=("${encoded_runner}") | ||
args+=(${{ inputs.arguments }}) | ||
|
||
echo "::set-output name=provenance_args::${args[@]}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you align the yaml formatting like we do in our other workflows?
I would also love to have this job integrated in our ci workflow.
It should run after the build
but before the job release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of these tests is to test the released code in a multi-platform context. That's why they don't use local action source but a named release. Do you think that I should use local code only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using local code we can capture the bug you resolved before cutting out another release. Would be great to have that.