From 537ae2d7e67a3e1e38d21e6eb05589d62aa13fdf Mon Sep 17 00:00:00 2001 From: Trim21 Date: Sat, 4 May 2024 11:31:24 +0800 Subject: [PATCH] ci: upgrade deprecated actions and command (#745) --- .github/workflows/build.yml | 2 +- .github/workflows/check.yml | 2 +- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/distribute-archlinux.yml | 2 +- .github/workflows/distribute-debian.yml | 6 +++--- .github/workflows/publish-rolling.yml | 12 ++++++------ .github/workflows/release.yml | 14 +++++++------- .github/workflows/test-backend.yml | 2 +- .github/workflows/translations.yml | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5be31339..d3228c99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 122cbd5d..95d5b6a8 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -19,7 +19,7 @@ jobs: check: [check-source-formatting, check-types, lint] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c7d22a70..e957c642 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -39,13 +39,13 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/distribute-archlinux.yml b/.github/workflows/distribute-archlinux.yml index f045d180..b2132c2d 100644 --- a/.github/workflows/distribute-archlinux.yml +++ b/.github/workflows/distribute-archlinux.yml @@ -11,7 +11,7 @@ jobs: aur: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Update PKGBUILD for AUR run: | diff --git a/.github/workflows/distribute-debian.yml b/.github/workflows/distribute-debian.yml index 7636c021..408bc720 100644 --- a/.github/workflows/distribute-debian.yml +++ b/.github/workflows/distribute-debian.yml @@ -16,7 +16,7 @@ jobs: node: [20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 @@ -45,7 +45,7 @@ jobs: - name: Parse version id: parse_version - run: echo ::set-output name=VERSION::`grep "VERSION = " ./BUILD | cut -d"\"" -f2 | cut -d"-" -f1` + run: echo VERSION=`grep "VERSION = " ./BUILD | cut -d"\"" -f2 | cut -d"-" -f1` >> $GITHUB_OUTPUT - name: Extract Flood tarball run: | @@ -60,7 +60,7 @@ jobs: cp -L bazel-bin/flood-deb-x64.deb flood-linux-x64.deb - name: Upload packages to Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/publish-rolling.yml b/.github/workflows/publish-rolling.yml index 1184783b..3180f04f 100644 --- a/.github/workflows/publish-rolling.yml +++ b/.github/workflows/publish-rolling.yml @@ -14,7 +14,7 @@ jobs: node: [20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 @@ -32,7 +32,7 @@ jobs: git config --local user.name "github-actions[bot]" build_version=0.0.0-master.`git rev-parse --short HEAD` npm version --no-git-tag-version $build_version - echo ::set-output name=BUILD_VERSION::$build_version + echo BUILD_VERSION=$build_version >> $GITHUB_OUTPUT - name: Use @jesec scope run: | @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -84,7 +84,7 @@ jobs: - name: Parse version id: parse_version run: | - echo ::set-output name=BUILD_VERSION::0.0.0-master.`git rev-parse --short HEAD` + echo BUILD_VERSION=0.0.0-master.`git rev-parse --short HEAD` >> $GITHUB_OUTPUT - name: Publish flood:master to Docker Hub uses: docker/build-push-action@v4 @@ -122,7 +122,7 @@ jobs: node: [20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 @@ -259,7 +259,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb7f7715..a565e1ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: node: [20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 @@ -51,10 +51,10 @@ jobs: - name: Get the version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + run: echo VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -72,7 +72,7 @@ jobs: needs: release runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Parse semantic version id: parse_semver @@ -81,9 +81,9 @@ jobs: major_version=`echo $full_version | cut -d'.' -f1` minor_version=`echo $full_version | cut -d'.' -f2` major_minor=`echo $major_version.$minor_version` - echo ::set-output name=MAJOR_VERSION::$major_version - echo ::set-output name=MAJOR_MINOR::$major_minor - echo ::set-output name=FULL_VERSION::$full_version + echo MAJOR_VERSION=$major_version >> $GITHUB_OUTPUT + echo MAJOR_MINOR=$major_minor >> $GITHUB_OUTPUT + echo FULL_VERSION=$full_version >> $GITHUB_OUTPUT - name: Set up QEMU run: | diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 627d8b7b..0cead520 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index d6739d1f..1b7e9281 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Crowdin Action uses: crowdin/github-action@1.4.8