Skip to content

Commit

Permalink
Update Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Mar 3, 2024
1 parent 1cd2ec8 commit 3573bda
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 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/[email protected]
id: wait-for-build
if: github.actor == 'dependabot[bot]'
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: 'Build Java 17'
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/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: automerge
if: github.actor == 'dependabot[bot]' && steps.wait-for-build.outputs.conclusion == 'success'
uses: "pascalgn/[email protected]"
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 }}
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ name: Build

on:
push:
branches:
- master
pull_request_target:
types: [ opened, synchronize, reopened ]
branches-ignore:
- dependabot/**

jobs:
build:
runs-on: ubuntu-latest
name: Build Java 17
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
cache: 'maven'

- name: Cache SonarCloud packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand Down
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 }}
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ only_commits:
- pom.xml
- appveyor.yml
version: '{build}'
clone_depth: 10
shallow_clone: true
environment:
matrix:
- appveyor_build_worker_image: Visual Studio 2022
Expand Down

0 comments on commit 3573bda

Please sign in to comment.