Skip to content

Commit

Permalink
Add Workflows (#17)
Browse files Browse the repository at this point in the history
* Create pullrequest.yml

* Create build.yml

* fix the import lmao

* fine, have your content write permission
  • Loading branch information
Thatsmusic99 authored Dec 8, 2023
1 parent 3ee017a commit 4ad683b
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Build"

on:
push:
branches: [ "master" ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Setup Java and Maven
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
46 changes: 46 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Build Pull Request"

on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Setup Java and Maven
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2


- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.ChunkingFilter;
Expand Down

0 comments on commit 4ad683b

Please sign in to comment.