Skip to content

Allow attaching commit status to specific commit. #42

Allow attaching commit status to specific commit.

Allow attaching commit status to specific commit. #42

Workflow file for this run

name: Test commit-status-action
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
create_status:
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.commit_status.outputs.commit_status_sha }}
steps:
- uses: actions/checkout@v4
- name: Create pending status
id: commit_status
uses: ./create
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
shellcheck:
# Use newer os for more up-to-date shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run shellcheck on .sh and .bash files files
run: |
find . -name '*.sh' -exec shellcheck -s bash '{}' \+
find . -name '*.bash' -exec shellcheck -s bash '{}' \+
finalize_status:
runs-on: ubuntu-latest
needs: [shellcheck, create_status]
if: ${{ always() }}
steps:
- uses: actions/checkout@v4
- name: Update commit status
uses: ./update
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-needs: ${{ toJson(needs) }}
sha: ${{ needs.create_status.outputs.sha }}