Skip to content

Commit

Permalink
feat(ci): bring back the runtime_sub logic to release
Browse files Browse the repository at this point in the history
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
  • Loading branch information
Mossaka committed Apr 17, 2024
1 parent 0f3fe7c commit d47e965
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ jobs:
echo "::error::This workflow should not be triggered with workflow_dispatch on a branch other than main"
exit 1
- uses: actions/checkout@v4
- name: parse crate
id: parse_crate
run: |
./scripts/parse-crate.sh ${{ steps.parse.outputs.crate }} >> $GITHUB_OUTPUT
- name: substring runtime
id: runtime_sub
uses: actions/github-script@v7
with:
script: |
const crate = '${{ inputs.crate }}';
const non_shim_crates = ['wasm', 'wasm-test-modules', 'oci-tar-builder'];
if non_shim_crates.includes(runtime) {
core.setOutput('is_shim', false)
} else {
core.setOutput('is_shim', true);
}
### If we are releasing a crate rather than producing a bin, check for crates.io access
- name: Check crates.io ownership
if: steps.parse_crate.outputs.is_crate == 'true'
if: ${{ steps.runtime_sub.outputs.is_shim != 'true' }}
run: |
cargo owner --list ${{ inputs.crate }} | grep github:containerd:runwasi-committers || \
cargo owner --add github:containerd:runwasi-committers ${{ inputs.crate }}
Expand Down

0 comments on commit d47e965

Please sign in to comment.