mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-23 06:31:02 -05:00
7017c233c9
Bumps [actions/github-script](https://github.com/actions/github-script) from v2 to v3. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v2...626af12fe9a53dc2972b48385e7fe7dec79145c9) Signed-off-by: dependabot[bot] <support@github.com>
63 lines
2 KiB
YAML
63 lines
2 KiB
YAML
---
|
|
#######################################
|
|
#######################################
|
|
## Dependabot automerge dependencies ##
|
|
#######################################
|
|
#######################################
|
|
|
|
#
|
|
# Documentation:
|
|
# https://medium.com/@toufik.airane/automerge-github-dependabot-alerts-with-github-actions-7cd6f5763750
|
|
#
|
|
|
|
######################
|
|
# name of the action #
|
|
######################
|
|
name: automerge on pull request
|
|
|
|
###############
|
|
# When to run #
|
|
###############
|
|
on: [pull_request]
|
|
|
|
#################
|
|
# Start the job #
|
|
#################
|
|
jobs:
|
|
automerge:
|
|
name: automerge dependabot
|
|
runs-on: ubuntu-latest
|
|
if: github.actor == 'dependabot[bot]'
|
|
steps:
|
|
- name: Wait for CI/CT/CD to succeed
|
|
uses: fountainhead/action-wait-for-check@v1.0.0
|
|
id: wait-for-build
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
checkName: Deploy Docker Image - DEV
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
|
- name: Wait for CI/CT/CD to succeed pt2
|
|
uses: fountainhead/action-wait-for-check@v1.0.0
|
|
id: wait-for-ci
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
checkName: Stack linter
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
|
- name: merge
|
|
if: steps.wait-for-build.outputs.conclusion == 'success' || steps.wait-for-build.outputs.conclusion == 'skipped' && steps.wait-for-ci.outputs.conclusion == 'success'
|
|
uses: actions/github-script@v3
|
|
with:
|
|
script: |
|
|
github.pulls.createReview({
|
|
owner: context.payload.repository.owner.login,
|
|
repo: context.payload.repository.name,
|
|
pull_number: context.payload.pull_request.number,
|
|
event: 'APPROVE'
|
|
})
|
|
github.pulls.merge({
|
|
owner: context.payload.repository.owner.login,
|
|
repo: context.payload.repository.name,
|
|
pull_number: context.payload.pull_request.number
|
|
})
|