guibranco / github-status-action-v2

:runner: :octocat: action to update status check of a pull request
https://github.com/marketplace/actions/github-status-action-v2
MIT License
2 stars 1 forks source link
gh-actions github-actions github-actions-status status status-action

github-status-action-v2 status github-status-action-v2 status wakatime

GitHub Status Action V2

Adds a status update to a commit. GitHub will always show the latest state of a context.

[!Warning]

Disclaimer This version was created because the original (V1) has been archived on May 1, 2024.

Usage

Inputs

Outputs

None.

Example

name: "test"

on: # run on any PRs and main branch changes
  pull_request:
  push:
    branches:
      - main

permissions:
  statuses: write

jobs:
  test:
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v4

    - name: Run the action
      uses: guibranco/github-status-action-v2@latest
      with: 
        authToken: ${{secrets.GITHUB_TOKEN}}
        context: 'Test run'
        description: 'Passed'
        state: 'success'
        sha: ${{github.event.pull_request.head.sha || github.sha}}

Permissions Settings for GitHub Actions

With the introduction of the permissions block in GitHub Actions, it is crucial to configure the necessary permissions for your workflows to function correctly. Below is a guide to help you set up the permissions securely and effectively.

Required Permissions

Refer to the GitHub documentation for a detailed list of available permissions.