Skip to content

Commit

Permalink
Migrate to shared Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Apr 14, 2024
1 parent 32844cf commit 471e576
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 54 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
name: Auto-merge Dependabot PRs

on:
pull_request_target
workflow_run:
workflows: [ "Pull Request" ]
types: [ completed ]

jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- name: Wait for build success
uses: fountainhead/action-wait-for-check@v1.0.0
id: wait-for-build
if: github.actor == 'dependabot[bot]'
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: build
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: autoapprove
if: github.actor == 'dependabot[bot]' && steps.wait-for-build.outputs.conclusion == 'success'
uses: hmarr/auto-approve-action@v2.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: automerge
if: github.actor == 'dependabot[bot]' && steps.wait-for-build.outputs.conclusion == 'success'
uses: "pascalgn/automerge-action@v0.12.0"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: "dependencies"
MERGE_METHOD: "squash"
automerge-dependabot-pr:
if: "github.actor == 'dependabot[bot]'
&& github.event.workflow_run.event == 'pull_request'
&& github.event.workflow_run.conclusion == 'success'"
uses: Jikoo/PlanarActions/.github/workflows/pr_automerge_complete.yml@master
with:
triggering-workflow-run: ${{ github.event.workflow_run.id }}
30 changes: 0 additions & 30 deletions .github/workflows/build.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Build

on:
push:
branches-ignore:
- dependabot/**

jobs:
run-ci:
uses: Jikoo/PlanarActions/.github/workflows/ci_maven.yml@master
13 changes: 13 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull Request

on:
pull_request:

jobs:
run-ci:
uses: Jikoo/PlanarActions/.github/workflows/ci_maven.yml@master
store-dependabot-pr-data:
if: "github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'"
uses: Jikoo/PlanarActions/.github/workflows/pr_automerge_prep.yml@master
with:
pr-number: ${{ github.event.number }}
3 changes: 3 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
before_install:
- sdk install java 17.0.10-tem
- sdk use java 17.0.10-tem

0 comments on commit 471e576

Please sign in to comment.