3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 14:30:17 +01:00

Pin all actions to sha commit hash (#4120)

* Pin all actions to sha commit hash

* Wrapper validation after checkoud for PR action
Dieser Commit ist enthalten in:
Kas-tle 2023-09-13 07:46:45 -07:00 committet von GitHub
Ursprung 8a12878eff
Commit 69f89edb91
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 36 neuen und 21 gelöschten Zeilen

Datei anzeigen

@ -19,54 +19,59 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository and submodules - name: Checkout repository and submodules
uses: actions/checkout@v3 # See https://github.com/actions/checkout/commits
uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
with: with:
submodules: recursive submodules: recursive
- name: Validate Gradle Wrapper - name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1 # See https://github.com/gradle/wrapper-validation-action/commits
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
- uses: actions/setup-java@v3 # See https://github.com/actions/setup-java/commits
- uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758
with: with:
java-version: 17 java-version: 17
distribution: temurin distribution: temurin
- name: Build - name: Build
uses: gradle/gradle-build-action@v2 # See https://github.com/gradle/gradle-build-action/commits
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
with: with:
arguments: build arguments: build
gradle-home-cache-cleanup: true gradle-home-cache-cleanup: true
- name: Archive artifacts (Geyser Fabric) - name: Archive artifacts (Geyser Fabric)
uses: actions/upload-artifact@v3 # See https://github.com/actions/upload-artifact/commits
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Fabric name: Geyser Fabric
path: bootstrap/fabric/build/libs/Geyser-Fabric.jar path: bootstrap/fabric/build/libs/Geyser-Fabric.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser Standalone) - name: Archive artifacts (Geyser Standalone)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Standalone name: Geyser Standalone
path: bootstrap/standalone/build/libs/Geyser-Standalone.jar path: bootstrap/standalone/build/libs/Geyser-Standalone.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser Spigot) - name: Archive artifacts (Geyser Spigot)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Spigot name: Geyser Spigot
path: bootstrap/spigot/build/libs/Geyser-Spigot.jar path: bootstrap/spigot/build/libs/Geyser-Spigot.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser BungeeCord) - name: Archive artifacts (Geyser BungeeCord)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser BungeeCord name: Geyser BungeeCord
path: bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar path: bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser Velocity) - name: Archive artifacts (Geyser Velocity)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Velocity name: Geyser Velocity
@ -75,7 +80,7 @@ jobs:
- name: Publish to Maven Repository - name: Publish to Maven Repository
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }} if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
uses: gradle/gradle-build-action@v2 uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
env: env:
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }} ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }} ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
@ -107,7 +112,7 @@ jobs:
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$project/$GITHUB_RUN_NUMBER/ rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$project/$GITHUB_RUN_NUMBER/
- name: Publish to Modrinth - name: Publish to Modrinth
uses: gradle/gradle-build-action@v2 uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }} if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
env: env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
@ -117,7 +122,8 @@ jobs:
- name: Notify Discord - name: Notify Discord
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }} if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
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: with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }} webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }} status: ${{ job.status }}

Datei anzeigen

@ -17,13 +17,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v3 # See https://github.com/actions/setup-java/commits
uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758
with: with:
java-version: 17 java-version: 17
distribution: temurin distribution: temurin
- name: Check if the author has forked the API repo - name: Check if the author has forked the API repo
uses: Kas-tle/find-forks-action@v1.0.1 # See https://github.com/Kas-tle/find-forks-action/commits
uses: Kas-tle/find-forks-action@1b5447d1e3c7a8ed79583dd817cc5399686eed3a
id: find_forks id: find_forks
with: with:
owner: GeyserMC owner: GeyserMC
@ -41,47 +43,54 @@ jobs:
./gradlew publishToMavenLocal ./gradlew publishToMavenLocal
- name: Checkout repository and submodules - name: Checkout repository and submodules
uses: actions/checkout@v3 # See https://github.com/actions/checkout/commits
uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
with: with:
submodules: recursive submodules: recursive
path: geyser path: geyser
- name: Validate Gradle Wrapper
# See https://github.com/gradle/wrapper-validation-action/commits
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
- name: Build Geyser - name: Build Geyser
uses: gradle/gradle-build-action@v2 # See https://github.com/gradle/gradle-build-action/commits
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
with: with:
arguments: build arguments: build
build-root-directory: geyser build-root-directory: geyser
- name: Archive artifacts (Geyser Fabric) - name: Archive artifacts (Geyser Fabric)
uses: actions/upload-artifact@v3 # See https://github.com/actions/upload-artifact/commits
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Fabric name: Geyser Fabric
path: geyser/bootstrap/fabric/build/libs/Geyser-Fabric.jar path: geyser/bootstrap/fabric/build/libs/Geyser-Fabric.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser Standalone) - name: Archive artifacts (Geyser Standalone)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Standalone name: Geyser Standalone
path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser Spigot) - name: Archive artifacts (Geyser Spigot)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Spigot name: Geyser Spigot
path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser BungeeCord) - name: Archive artifacts (Geyser BungeeCord)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser BungeeCord name: Geyser BungeeCord
path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
if-no-files-found: error if-no-files-found: error
- name: Archive artifacts (Geyser Velocity) - name: Archive artifacts (Geyser Velocity)
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success() if: success()
with: with:
name: Geyser Velocity name: Geyser Velocity