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

Update status with webhook from other repo actions #2

Open
gadenbuie opened this issue Dec 17, 2020 · 2 comments
Open

Update status with webhook from other repo actions #2

gadenbuie opened this issue Dec 17, 2020 · 2 comments

Comments

@gadenbuie
Copy link
Owner

gadenbuie commented Dec 17, 2020

Using https://github.com/peter-evans/repository-dispatch. The workflow in this repo is all set up but I'd need to wire it up in the workflows of the tracked repos (and document how to do it).

@gadenbuie
Copy link
Owner Author

  • Create a new PAT with repo and workflow access

  • tic::gha_add_secret("<paste_token_here>", name = "TIC_UPDATE", repo_slug = "owner/repo") for each repo that needs the secret

  • In each repo run tic::use_update_yml() (optional)

  • In each repo update the .github/workflows/main.yml (or whatever name the action is) and add this step:

    - name: Update status dashboard at gadenbuie/status
        uses: peter-evans/repository-dispatch@v1
        if: github.ref == 'refs/heads/HEAD' &&  matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
        with:
          token: ${{ secrets.TIC_UPDATE }}
          event-type: status-update
          repository: gadenbuie/status # where to send the event

gadenbuie added a commit that referenced this issue Apr 20, 2022
@gadenbuie
Copy link
Owner Author

Adds a composite action, designed to work with r-lib/actions/check-standard

- name: Update status dashboard
  uses: gadenbuie/status/actions/status-update-rcmdcheck@main
  with:
    github-token-repo-scope: ${{ secrets.GITHUB_STATUS_UPDATE_TOKEN }}
    status-repo: gadenbuie/status

Note that the action internally includes the condition:

      if: |
        (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') &&
        matrix.config.os == 'ubuntu-latest' &&
        matrix.config.r == 'release'

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