Skip to content

Commit 0b6f7f7

Browse files
authored
Merge pull request #17 from Shopify/dependabot-automerge-token
dependabot-automerge: GITHUB_TOKEN via secret input
2 parents 6bad9c3 + 2712ef6 commit 0b6f7f7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/dependabot-automerge.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ on:
3838
default: none
3939
description: |
4040
NPM upgrades to automatically merge. Valid values are: all, none, major, minor, patch.
41+
secrets:
42+
token:
43+
required: true
44+
description: GitHub token - probably secrets.GITHUB_TOKEN
4145

4246
permissions: {}
4347

@@ -79,7 +83,7 @@ jobs:
7983
id: metadata
8084
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0
8185
with:
82-
github-token: ${{ secrets.GITHUB_TOKEN }}
86+
github-token: ${{ secrets.token }}
8387

8488
- name: Merge GitHub Actions update
8589
if: |
@@ -103,7 +107,7 @@ jobs:
103107
)
104108
)
105109
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110+
GITHUB_TOKEN: ${{ secrets.token }}
107111
MERGE_ALL: ${{ inputs.all }}
108112
MERGE_ECOSYSTEM: ${{ inputs.actions }}
109113
UPDATE_TYPE: ${{ steps.metadata.outputs.update-type }}
@@ -134,7 +138,7 @@ jobs:
134138
)
135139
)
136140
env:
137-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
GITHUB_TOKEN: ${{ secrets.token }}
138142
MERGE_ALL: ${{ inputs.all }}
139143
MERGE_ECOSYSTEM: ${{ inputs.npm }}
140144
UPDATE_TYPE: ${{ steps.metadata.outputs.update-type }}
@@ -165,7 +169,7 @@ jobs:
165169
)
166170
)
167171
env:
168-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
GITHUB_TOKEN: ${{ secrets.token }}
169173
MERGE_ALL: ${{ inputs.all }}
170174
MERGE_ECOSYSTEM: ${{ inputs.gomod }}
171175
UPDATE_TYPE: ${{ steps.metadata.outputs.update-type }}

0 commit comments

Comments
 (0)