diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..02d0069b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# For more information, read https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates + +version: 2 +updates: + # Enable version updates for Maven + # Since the bot relies on it, check daily for updates + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" + + # Enable version updates for Actions + # Since Actions is secondary, only check for updates weekly + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0de97b95..cb9dcd10 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,30 +1,25 @@ name: Java CI - -on: [push] - +on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.commits[0].message, '[ci-skip]')" - + # Only run on PRs if the source branch is on someone else's repo + if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} strategy: matrix: java: [16] fail-fast: true - steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} - distribution: 'adopt' - + distribution: 'temurin' - name: Build with Maven run: mvn clean package - - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v3 + if: ${{ github.event_name != 'pull_request' }} with: name: RC24-Bot path: target/RC24-Bot.jar \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index b27a45de..00000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Pull Request - -on: [pull_request] - -jobs: - build: - runs-on: ubuntu-latest - if: "!contains(github.event.commits[0].message, '[ci-skip]')" - - strategy: - matrix: - java: [16] - fail-fast: true - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - distribution: 'adopt' - - - name: Build with Maven - run: mvn clean package