adjust codeowners gitaction #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Code Owners | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "feature/prs" ] | |
pull_request: | |
branches: [ "feature/prs" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
generate_owners: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install CLI Dependencies | |
run: | | |
sudo apt-get install fd-find wget | |
wget https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64.tar.gz -O - | sudo tar xz && sudo mv yq_linux_amd64 /usr/bin/yq | |
- name: Run Generate Owner's Script | |
run: | | |
chmod +x ./.github/generate_codeowners.sh | |
./.github/generate_codeowners.sh | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "add codeowners" | |
add: 'CODEOWNERS* --force' | |
cwd: './.github/' |