Skip to content

Commit

Permalink
[Dependencies] - Update .github/workflows/merge-dependabot.yml to mat…
Browse files Browse the repository at this point in the history
…ch the template repo
  • Loading branch information
credfeto committed Jan 23, 2024
1 parent ee60def commit 9051f42
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Dependabot: Merge actions updates in template repos"
name: "Dependabot: Merge updates"
on:
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
# could and should work, at least for public repos;
Expand All @@ -23,7 +23,7 @@ on:
status: { }

jobs:
auto_merge_dependabot:
auto-merge-github-actions:
if: |-
vars.DEPENDABOT_AUTOMERGE == 'true' &&
startsWith(github.head_ref, 'dependabot/github_actions/')
Expand Down Expand Up @@ -56,3 +56,36 @@ jobs:
MERGE_FORKS: false
MERGE_LABELS: github-actions
UPDATE_RETRIES: 10

auto-merge-npm:
if: |-
vars.DEPENDABOT_AUTOMERGE == 'true' &&
startsWith(github.head_ref, 'dependabot/npm_and_yarn/')
runs-on: [self-hosted, linux]

permissions:
contents: write
pull-requests: write

# Specifically check that dependabot (or another trusted party) created this pull-request, and that it has been labelled correctly.
steps:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"
- name: "Check Owner"
uses: actions/[email protected]
with:
script: |
core.info('Owner: ${{github.repository_owner}}');
- name: "Auto-Merge"
if: github.repository_owner == 'funfair-tech'
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{secrets.SOURCE_PUSH_TOKEN}}
MERGE_METHOD: merge
MERGE_COMMIT_MESSAGE: pull-request-title-and-description
MERGE_REQUIRED_APPROVALS: 1
MERGE_DELETE_BRANCH: true
MERGE_FORKS: false
MERGE_LABELS: github-actions
UPDATE_RETRIES: 10

0 comments on commit 9051f42

Please sign in to comment.