diff --git a/.github/workflows/docker-image-amd64-en.yml b/.github/workflows/docker-image-amd64-en.yml index 3518d104..02e42d74 100644 --- a/.github/workflows/docker-image-amd64-en.yml +++ b/.github/workflows/docker-image-amd64-en.yml @@ -18,7 +18,7 @@ jobs: contents: read steps: - name: Check out the repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@v4 - name: Save version info run: | @@ -28,20 +28,20 @@ jobs: run: | python ./i18n/translate.py --repository_path . --json_file_path ./i18n/en.json - name: Log in to Docker Hub - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + uses: docker/metadata-action@v5 with: images: | ckt1031/one-api-en - name: Build and push Docker images - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/docker-image-amd64.yml b/.github/workflows/docker-image-amd64.yml index bafb0f7b..22269b3a 100644 --- a/.github/workflows/docker-image-amd64.yml +++ b/.github/workflows/docker-image-amd64.yml @@ -18,20 +18,20 @@ jobs: contents: read steps: - name: Check out the repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@v4 - name: Save version info run: | git describe --tags > VERSION - name: Log in to Docker Hub - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to the Container registry - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -39,14 +39,14 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + uses: docker/metadata-action@v5 with: images: | ckt1031/one-api ghcr.io/${{ github.repository }} - name: Build and push Docker images - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/docker-image-arm64.yml b/.github/workflows/docker-image-arm64.yml index 1db0a4ce..d982638a 100644 --- a/.github/workflows/docker-image-arm64.yml +++ b/.github/workflows/docker-image-arm64.yml @@ -19,26 +19,26 @@ jobs: contents: read steps: - name: Check out the repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@v4 - name: Save version info run: | git describe --tags > VERSION - name: Set up QEMU - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to the Container registry - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -46,14 +46,14 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + uses: docker/metadata-action@v5 with: images: | ckt1031/one-api ghcr.io/${{ github.repository }} - name: Build and push Docker images - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/linux-release-en.yml b/.github/workflows/linux-release-en.yml index 79d08d0e..e8791a34 100644 --- a/.github/workflows/linux-release-en.yml +++ b/.github/workflows/linux-release-en.yml @@ -12,9 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - fetch-depth: 0 + uses: actions/checkout@v4 - name: Translate run: | @@ -28,7 +26,7 @@ jobs: REACT_APP_VERSION=$(git describe --tags) npm run build cd .. - name: Set up Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + uses: actions/setup-go@v4 with: go-version: ">=1.18.0" - name: Build Backend (amd64) @@ -43,7 +41,7 @@ jobs: CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X 'one-api/common.Version=$(git describe --tags)' -extldflags '-static'" -o one-api-arm64-en - name: Release - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 693103e8..5551bbbb 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -12,9 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - fetch-depth: 0 + uses: actions/checkout@v4 - name: Build Frontend env: CI: "" @@ -24,7 +22,7 @@ jobs: REACT_APP_VERSION=$(git describe --tags) npm run build cd .. - name: Set up Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + uses: actions/setup-go@v4 with: go-version: ">=1.18.0" - name: Build Backend (amd64) @@ -39,7 +37,7 @@ jobs: CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X 'one-api/common.Version=$(git describe --tags)' -extldflags '-static'" -o one-api-arm64 - name: Release - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index 5cf40f92..f377a576 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -12,9 +12,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - fetch-depth: 0 + uses: actions/checkout@v4 - name: Build Frontend env: CI: "" @@ -24,7 +22,7 @@ jobs: REACT_APP_VERSION=$(git describe --tags) npm run build cd .. - name: Set up Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + uses: actions/setup-go@v4 with: go-version: ">=1.18.0" - name: Build Backend @@ -32,7 +30,7 @@ jobs: go mod download go build -ldflags "-X 'one-api/common.Version=$(git describe --tags)'" -o one-api-macos - name: Release - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: one-api-macos diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 38ff947b..e76ca370 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -15,9 +15,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - fetch-depth: 0 + uses: actions/checkout@v4 - name: Build Frontend env: CI: "" @@ -27,7 +25,7 @@ jobs: REACT_APP_VERSION=$(git describe --tags) npm run build cd .. - name: Set up Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + uses: actions/setup-go@v4 with: go-version: ">=1.18.0" - name: Build Backend @@ -35,7 +33,7 @@ jobs: go mod download go build -ldflags "-s -w -X 'one-api/common.Version=$(git describe --tags)'" -o one-api.exe - name: Release - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: one-api.exe