-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(IDX): create workflow for repo policies (#71)
* chore(IDX): create workflow for repo policies * Update repo_policies_ruleset.yml * update path * add composite action for python setup * add shell * rename * fix path * update composite action * update message * Update repo_policies_ruleset.yml
- Loading branch information
Showing
7 changed files
with
68 additions
and
29 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Python Setup | ||
description: Installs Python and necessary dependencies | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install Dependencies | ||
run: pip install -r requirements.txt | ||
shell: bash |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Repository Policies | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
check-bot-policies: | ||
name: Check Bot Policies | ||
runs-on: ubuntu-latest | ||
# Dont run this workflow on merge queue | ||
if: ${{ github.event_name != 'merge_group' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: dfinity/public-workflows | ||
|
||
- name: Python Setup | ||
uses: ./.github/workflows/python-setup | ||
|
||
- name: Bot Checks | ||
id: bot-checks | ||
run: | | ||
export PYTHONPATH="$PWD/reusable_workflows/" | ||
python reusable_workflows/repo_policies/bot_checks/check_bot_approved_files.py | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_ORG: ${{ github.repository_owner }} | ||
USER: ${{ github.event.pull_request.user.login }} | ||
REPO: ${{ github.repository }} | ||
MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
BRANCH_HEAD_SHA: ${{ github.event.pull_request.head.sha }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# triggered on all repositories via rulesets | ||
|
||
name: Repo Policies Ruleset | ||
|
||
on: | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
call-repo-policies: | ||
uses: dfinity/public-workflows/.github/workflows/repo_policies.yml@main | ||
secrets: inherit |
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