Run @relative-ci/agent job on GitHub Actions

Update configuration

Update .github/workflow/WORKFLOW_NAME.yml to run @relative-ci/agent after the build is done.

.github/workflow/build.yml
name: Build
on: push
jobs:
build:
steps:
- run: npm ci
- run: npm run build --json webpack-stats.json
- run: npx relative-ci-agent
env:
RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}

pull_request workflows

When the action is running on the pull_request event, GitHub is reporting the merge commit information:

{
branch: 'refs/pull/2377/merge',
commit: 'Merge #abc124 into #abc123'
}

To allow @relative-ci/agent to send the information corresponding to the commit that triggered the pull_request event, use RelativeCI/agent GitHub Action.

workflows triggered by forked repositories

GitHub actions do not share secrets with workflows triggered by forked repositories.

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository. (Using encrypted secrets in a workflow)

To securely run @relative-ci/agent for builds triggered by forked repositories, use RelativeCI/agent GitHub Action.





Need help?Contact us via email, Twitter, or GitHub!