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

Repository dispatch action #1

Open
staticaland opened this issue Jan 4, 2023 · 2 comments
Open

Repository dispatch action #1

staticaland opened this issue Jan 4, 2023 · 2 comments

Comments

@staticaland
Copy link
Collaborator

staticaland commented Jan 4, 2023

Use curl and use https://github.com/peter-evans/repository-dispatch/blob/main/action.yml

https://gist.github.com/Daniel-ltw/552b90800b07c22e4a83dfa68ada6318

Never mind, use OctoKit instead:

    - name: Deploy Stage
      uses: actions/github-script@v5
      with:
        script: |
          await github.rest.actions.createWorkflowDispatch({
            'Mause',
            'fdroidrepo',
            'workflows/update.yaml',
            'main',
          });
 - name: Bundle
    id: bundle
    if: ${{ steps.changesets.outputs.published == 'true' }}
    uses: actions/github-script@v6
    with:
      script: |
        try {
          const result = await github.rest.actions.createWorkflowDispatch({
            owner: 'asdads',
            repo: 'asdasd',
            workflow_id: 'abc.yml',
            ref: 'main',
            inputs: {
              tags: ${{ steps.docker.id }}
            },
          })
          console.log(result);
        } catch(error) {
          console.error(error);
          core.setFailed(error);
        }
@staticaland
Copy link
Collaborator Author

staticaland commented Apr 16, 2023

Use @actions/http-client instead?

Basic, Bearer and PAT Support out of the box. Extensible handlers for others.

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