Skip to content

Commit f12924e

Browse files
authored
ci(auto-add-to-project): make reusable via workflow_call, pin action version (#4)
* ci(auto-add-to-project): make reusable via workflow_call, pin action version, lock down permissions * ci(auto-add-to-project): make reusable via workflow_call, pin action version, lock down permissions
1 parent f93db1f commit f12924e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1+
# Triggered directly on issues/PRs in this (.github) repo,
2+
# AND callable as a reusable workflow from any other repo in the org.
13
name: Auto-add to Octo Board
24

35
on:
6+
# Direct trigger: covers events in the .github repo itself
47
issues:
58
types: [opened]
69
pull_request_target:
710
types: [opened]
11+
# Reusable trigger: called from per-repo caller workflows
12+
workflow_call:
13+
secrets:
14+
PROJECT_TOKEN:
15+
required: true
16+
17+
# GITHUB_TOKEN needs no permissions; PROJECT_TOKEN (PAT) is used instead
18+
permissions: {}
819

920
jobs:
1021
add-to-project:
1122
runs-on: ubuntu-latest
1223
steps:
13-
- uses: actions/add-to-project@v1
24+
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
1425
with:
1526
project-url: https://github.com/orgs/Mininglamp-OSS/projects/2
1627
github-token: ${{ secrets.PROJECT_TOKEN }}

0 commit comments

Comments
 (0)