From 56048dcdb05b99083e2ba7ff9fef8025edfa9bf6 Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Fri, 8 Dec 2023 19:50:12 -0500 Subject: [PATCH] Update Github Actions (#788) * Update github actions * Replace set-output --- .github/workflows/build_pull_request.yml | 19 +++++++++---------- .github/workflows/build_push.yml | 20 ++++++++++---------- .github/workflows/publish.yml | 19 ++++++++++--------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index eb9ecaa9..a89a9bf7 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -3,6 +3,10 @@ name: CI Pull Request on: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check_wrapper: name: Validate Gradle Wrapper @@ -10,7 +14,7 @@ jobs: steps: - name: Clone repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 @@ -18,26 +22,21 @@ jobs: build: name: Build pull request needs: check_wrapper - if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')" runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ github.token }} - - name: Checkout pull request - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} path: master fetch-depth: 0 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: 8 + distribution: 'temurin' - name: Copy CI gradle.properties run: | diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 8b3ba09d..29e1d0e1 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -5,6 +5,10 @@ on: branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check_wrapper: name: Validate Gradle Wrapper @@ -19,25 +23,20 @@ jobs: build: name: Build Jar needs: check_wrapper - if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')" runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ github.token }} - - name: Checkout master branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: master path: master fetch-depth: 0 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: 8 + distribution: 'temurin' - name: Copy CI gradle.properties run: | @@ -69,6 +68,7 @@ jobs: - name: Tar scripts dir to maintain file permissions run: tar -cvzf scripts.tar.gz -C master/ scripts/ + - name: Upload scripts.tar.gz uses: actions/upload-artifact@v3 with: @@ -174,7 +174,7 @@ jobs: cd release genTag=$(ls *.jar | sed -e's/Tachidesk-Server-\|.jar//g') echo "$genTag" - echo "::set-output name=value::$genTag" + echo "value=$genTag" >> $GITHUB_OUTPUT - name: Create Tag run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1b221ebe..8be15f3c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,13 +6,17 @@ on: tags: - "v*" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check_wrapper: name: Validate Gradle Wrapper runs-on: ubuntu-latest steps: - name: Clone repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 @@ -22,22 +26,18 @@ jobs: needs: check_wrapper runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ github.token }} - - name: Checkout ${{ github.ref }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} path: master fetch-depth: 0 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: 8 + distribution: 'temurin' - name: Copy CI gradle.properties run: | @@ -70,6 +70,7 @@ jobs: - name: Tar scripts dir to maintain file permissions run: tar -cvzf scripts.tar.gz -C master/ scripts/ + - name: Upload scripts.tar.gz uses: actions/upload-artifact@v3 with: