Skip to content

Commit 4dc96be

Browse files
committed
add repo-dispatch action with test
work in progress
1 parent 9c840fb commit 4dc96be

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: repository-dispatch
2+
description: creates repository_dispatch event in target repository
3+
inputs:
4+
secret-token:
5+
description: fine-grained personal access token with content write permission for the target repo
6+
required: true
7+
secret-token-2:
8+
description: another secret
9+
required: true
10+
runs:
11+
using: composite
12+
steps:
13+
- # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#masking-a-value-in-a-log
14+
name: mask secret token
15+
run: echo "::add-mask::$SECRET_TOKEN"
16+
shell: bash
17+
env:
18+
SECRET_TOKEN: ${{ inputs.secret-token }}
19+
20+
- name: mask secret token
21+
run: echo "::add-mask::${{ inputs.secret-token2 }}"
22+
shell: bash
23+
24+
- shell: bash
25+
run: |
26+
echo "${{ inputs.secret-token }}"
27+
echo "${{ inputs.secret-token-2 }}"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow tests the reusable repo-dispatch action
2+
3+
name: test repo-dispatch action
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
workflow_dispatch:
11+
12+
jobs:
13+
dispatch:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: checkout so we can use local action
17+
uses: actions/checkout@v4
18+
- name: test action
19+
uses: ./.github/actions/repo-dispatch
20+
with:
21+
secret-token: my-secret-token
22+
secret-token-2: my-secret-token-2

0 commit comments

Comments
 (0)