Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
scandar committed Nov 12, 2024
1 parent 38f446b commit 8dc0c05
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,20 @@ permissions:

jobs:
check-codeowners:
name: Check CODEOWNERS
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check CODEOWNERS
id: ownyourcode
uses: getyourguide/ownyourcode@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ github.event.number }}

- name: Print Output
run: |
echo "${{ steps.ownyourcode.outputs.total_orphan_files }}"
echo "${{ steps.ownyourcode.outputs.total_scanned_files }}"
echo "${{ steps.ownyourcode.outputs.failed }}"
```
### Using on a branch
Expand All @@ -106,20 +108,18 @@ on:
push:
branches:
- main

permissions:
id-token: write
contents: read
pull-requests: write # we need this to write comments in PRs
jobs:
check-codeowners:
name: Check CODEOWNERS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Test Local Action
uses: getyourguide/ownyourcode@v1
- name: Check CODEOWNERS
id: ownyourcode
uses: getyourguide/ownyourcode@checkout-action-repo
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}
Expand All @@ -131,26 +131,21 @@ jobs:
---
jobs:
check-codeowners:
name: Check CODEOWNERS
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check CODEOWNERS
id: ownyourcode
uses: getyourguide/ownyourcode@v1
uses: getyourguide/ownyourcode@checkout-action-repo
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ github.event.number }}
branch: ${{ github.ref_name }}
fail-on-missing-codeowners: false # important for next step to work

- name: Print Output
id: output
run: |
echo "${{ steps.ownyourcode.outputs.total_orphan_files }}"
echo "${{ steps.ownyourcode.outputs.total_scanned_files }}"
echo "${{ steps.ownyourcode.outputs.failed }}"
echo "Total orphan files: ${{ steps.ownyourcode.outputs.total_orphan_files }}"
echo "Total scanned files: ${{ steps.ownyourcode.outputs.total_scanned_files }}"
echo "Failed: ${{ steps.ownyourcode.outputs.failed }}"
```
## CODEOWNERS file
Expand Down

0 comments on commit 8dc0c05

Please sign in to comment.