You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All scripts can be easily integrated into GitHub Actions workflows. Here are practical examples:
840
+
You can use these scripts in your own repository's workflows without copying or forking this repo. The pattern is to check out `locus313/github-api-scripts` as a step, then reference scripts from that path.
841
+
842
+
```yaml
843
+
- name: Checkout github-api-scripts
844
+
uses: actions/checkout@v4
845
+
with:
846
+
repository: locus313/github-api-scripts
847
+
ref: main # Pin to a specific tag or SHA in production
848
+
path: github-api-scripts
849
+
```
850
+
851
+
> [!NOTE]
852
+
> For production workflows, pin `ref` to a specific tag (e.g., `v1.0.0`) or commit SHA rather than a branch name to ensure reproducibility and prevent unexpected changes.
853
+
854
+
---
841
855
842
856
### Example 1: Grant Team Permissions on Repository Changes
> Example 4 checks out your own repository at the workspace root (so `git push` commits to it), and places `github-api-scripts` in a hidden subdirectory (`.github-api-scripts`) to avoid conflicts with your repo's content.
1031
+
992
1032
### GitHub Actions Best Practices
993
1033
994
1034
**Use separate secrets for sensitive operations:**
@@ -1002,8 +1042,8 @@ env:
1002
1042
```yaml
1003
1043
- name: Run script with logging
1004
1044
run: |
1005
-
./org-admin/github-add-repo-permissions/github-add-repo-permissions.sh 2>&1 | tee -a execution.log
1006
-
1045
+
./github-api-scripts/org-admin/github-add-repo-permissions/github-add-repo-permissions.sh 2>&1 | tee -a execution.log
0 commit comments