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 Request: Allow Pinning Service providers to add compliance checks to their pipeline easily #140

Open
4 tasks
SgtPooki opened this issue Jun 24, 2022 · 1 comment

Comments

@SgtPooki
Copy link
Member

SgtPooki commented Jun 24, 2022

This FR was mentioned in application-research/estuary#290 (comment), and I think it's a great idea. I am not 100% sure how to go about doing this, but it's worth investigating.

Some ideas of ways we could do this:

  1. Export actions that receive pinning endpoints & tokens
  2. ??

for idea 1 above

How pinning service providers would call the action:

  run-compliance-tests:
    uses: ipfs-shipyard/pinning-service-compliance/.github/workflows/[email protected]
    secrets:
      API_ENDPOINT: ${{ secrets.PINNING_API_ENDPOINT }}
      API_TOKEN: ${{ secrets.PINNING_API_TOKEN }}

See https://docs.github.com/en/actions/using-workflows/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow

How pinning service providers would use the results

  validate-compliance:
    runs-on: ubuntu-latest
    needs: run-compliance-tests
    if: ${{ needs.run-compliance-tests.outputs.passed < needs.run-compliance-tests.outputs.total }}
    steps:
      - name: Fail
        uses: actions/github-script@v3
        with:
          script: |
            core.setFailed('Only ${{ needs.run-compliance-tests.outputs.passed }}/${{ needs.run-compliance-tests.outputs.total}} checks passed')

See https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-outputs-from-a-reusable-workflow

@SgtPooki
Copy link
Member Author

The validate-compliance check in the description above may be able to be contained within the re-usable action itself.

SgtPooki added a commit that referenced this issue Jun 24, 2022
Related to #140 but doesn't fix it until we can get the resulting JSON
SgtPooki added a commit that referenced this issue Sep 7, 2022
…ort json (#141)

* chore: update dispatchable workflows

* fix: define type input for publish-reports

this should fix https://github.com/ipfs-shipyard/pinning-service-compliance/actions/runs/2557324694/workflow

* feat: create reusable service provider action

Related to #140 but doesn't fix it until we can get the resulting JSON

* feat: Emit json results as JSON

* chore: revert workflow changes; favor PR #142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant