Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin actions to sha commit #445

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
# See https://github.com/actions/checkout/commits
uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
with:
submodules: recursive

- uses: actions/setup-java@v3
- name: Validate Gradle Wrapper
# See https://github.com/gradle/wrapper-validation-action/commits
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4

# See https://github.com/actions/setup-java/commits
- uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758
with:
java-version: 17
distribution: temurin

- name: Build
uses: gradle/gradle-build-action@v2
# See https://github.com/gradle/gradle-build-action/commits
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
with:
arguments: build
cache-read-only: ${{ github.ref_name != 'master' && github.ref_name != 'development' }}

- name: Publish to Maven Repository
if: ${{ github.repository == 'GeyserMC/Floodgate' }}
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
env:
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
Expand Down Expand Up @@ -65,6 +72,7 @@ jobs:

- name: Notify Discord
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Floodgate' }}
uses: Tim203/actions-git-discord-webhook@main
# See https://github.com/Tim203/actions-git-discord-webhook/commits
uses: Tim203/actions-git-discord-webhook@70f38ded3aca51635ec978ab4e1a58cd4cd0c2ff
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
33 changes: 22 additions & 11 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,45 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout repository and submodules
# See https://github.com/actions/checkout/commits
uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
with:
submodules: recursive

- name: Validate Gradle Wrapper
# See https://github.com/gradle/wrapper-validation-action/commits
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4

- name: Set up JDK 17
uses: actions/setup-java@v2
# See https://github.com/actions/setup-java/commits
- uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
java-version: 17
distribution: temurin

- name: Build with Maven
run: ./gradlew build
- name: Build
# See https://github.com/gradle/gradle-build-action/commits
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
with:
arguments: build

- name: Archive artifacts (Floodgate Bungee)
uses: actions/upload-artifact@v2
# See https://github.com/actions/upload-artifact/commits
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success()
with:
name: Floodgate Bungee
path: bungee/build/libs/floodgate-bungee.jar

- name: Archive artifacts (Floodgate Spigot)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success()
with:
name: Floodgate Spigot
path: spigot/build/libs/floodgate-spigot.jar

- name: Archive artifacts (Floodgate Velocity)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success()
with:
name: Floodgate Velocity
Expand Down