From e6d904893f811012c007d0b7fd4f6b03fb3220f2 Mon Sep 17 00:00:00 2001 From: jvstme <36324149+jvstme@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:16:44 +0000 Subject: [PATCH] [Internal] Update GitHub Actions dependencies (#1436) --- .github/workflows/build.yml | 19 +++++---- .github/workflows/close-inactive-issues.yml | 4 +- .github/workflows/docker.yml | 30 +++++++------- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yml | 43 +++++++++++---------- 5 files changed, 52 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da6af2d68..d06176ff5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version-file: runner/go.mod + cache-dependency-path: runner/go.sum - name: Run golangci-lint uses: golangci/golangci-lint-action@v6 with: @@ -115,7 +116,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version-file: runner/go.mod + cache-dependency-path: runner/go.sum - name: build env: GOOS: ${{ matrix.goos }} @@ -127,9 +129,9 @@ jobs: go build -ldflags "-X 'main.Version=$VERSION' -extldflags '-static'" -o dstack-runner-$GOOS-$GOARCH $REPO_NAME/runner/cmd/runner go build -ldflags "-X 'main.Version=$VERSION' -extldflags '-static'" -o dstack-shim-$GOOS-$GOARCH $REPO_NAME/runner/cmd/shim echo $VERSION - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: dstack-runner + name: dstack-runner-${{ matrix.goos }}-${{ matrix.goarch }} path: | runner/dstack-runner-${{ matrix.goos }}-${{ matrix.goarch }} runner/dstack-shim-${{ matrix.goos }}-${{ matrix.goarch }} @@ -143,9 +145,10 @@ jobs: - name: Install AWS run: pip install awscli - name: Download Runner - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: dstack-runner + pattern: dstack-runner-* + merge-multiple: true path: runner - name: Upload to S3 working-directory: runner @@ -165,8 +168,8 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install AWS diff --git a/.github/workflows/close-inactive-issues.yml b/.github/workflows/close-inactive-issues.yml index 9cf265403..6a2f38169 100644 --- a/.github/workflows/close-inactive-issues.yml +++ b/.github/workflows/close-inactive-issues.yml @@ -1,5 +1,6 @@ name: Close inactive issues on: + workflow_dispatch: schedule: - cron: "30 1 * * *" @@ -11,14 +12,13 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v5 + - uses: actions/stale@v9 with: days-before-issue-stale: 30 days-before-issue-close: 14 stale-issue-label: "stale" stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale. Please reopen the issue if it is still relevant." - close-issue-reason: not_planned days-before-pr-stale: -1 days-before-pr-close: -1 repo-token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 34d154134..12455c5c5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -51,16 +51,16 @@ jobs: python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Build and upload to DockerHub run: | docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1 -f base/Dockerfile . @@ -79,7 +79,7 @@ jobs: matrix: variant: [ "", "-cuda" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download packer run: | wget https://releases.hashicorp.com/packer/${{ env.PACKER_VERSION }}/packer_${{ env.PACKER_VERSION }}_linux_amd64.zip @@ -108,8 +108,8 @@ jobs: matrix: variant: [ "", "-cuda", "-grid" ] steps: - - uses: actions/checkout@v3 - - uses: Azure/login@v1 + - uses: actions/checkout@v4 + - uses: Azure/login@v2 name: Log in to az with: creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}' @@ -142,15 +142,15 @@ jobs: contents: 'read' id-token: 'write' steps: - - uses: actions/checkout@v3 - - name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@v1' + - uses: actions/checkout@v4 + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@v2 with: workload_identity_provider: 'projects/531508670106/locations/global/workloadIdentityPools/github-identity-pool/providers/github-id-provider' service_account: 'github-actions@dstack.iam.gserviceaccount.com' create_credentials_file: true - - name: 'Set up Cloud SDK' - uses: 'google-github-actions/setup-gcloud@v1' + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v2 - name: Download packer run: | wget https://releases.hashicorp.com/packer/${{ env.PACKER_VERSION }}/packer_${{ env.PACKER_VERSION }}_linux_amd64.zip @@ -179,7 +179,7 @@ jobs: matrix: variant: [ "", "-cuda" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup OCI config run: | mkdir ~/.oci @@ -246,7 +246,7 @@ jobs: working-directory: scripts/packer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get Nebius CLI run: | echo "CLI_VERSION=$CLI_VERSION" @@ -255,7 +255,7 @@ jobs: env: CLI_VERSION: 0.113.0+Nebius-AI - name: Write Nebius credentials - uses: jsdaniell/create-json@v1.2.2 + uses: jsdaniell/create-json@v1.2.3 with: name: "service_account.json" json: ${{ secrets.NEBIUS_SERVICE_ACCOUNT }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5ec3b892f..d9ca600a8 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install dstack diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f70ecc176..a364b9907 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,16 +49,17 @@ jobs: working-directory: runner runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.21.1 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + go-version-file: runner/go.mod + cache-dependency-path: runner/go.sum + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 with: - version: v1.51.2 - args: --issues-exit-code=0 --timeout=20m + version: v1.58 + args: --timeout=20m working-directory: runner - name: Test run: | @@ -84,7 +85,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version-file: runner/go.mod + cache-dependency-path: runner/go.sum - name: build env: GOOS: ${{ matrix.goos }} @@ -95,9 +97,9 @@ jobs: VERSION=${GITHUB_REF#refs/tags/} go build -ldflags "-X '$REPO_NAME/runner/cmd/runner/version.Version=$VERSION' -extldflags '-static'" -o dstack-runner-$GOOS-$GOARCH $REPO_NAME/runner/cmd/runner go build -ldflags "-X '$REPO_NAME/runner/cmd/shim/version.Version=$VERSION' -extldflags '-static'" -o dstack-shim-$GOOS-$GOARCH $REPO_NAME/runner/cmd/shim - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: dstack-runner + name: dstack-runner-${{ matrix.goos }}-${{ matrix.goarch }} path: | runner/dstack-runner-${{ matrix.goos }}-${{ matrix.goarch }} runner/dstack-shim-${{ matrix.goos }}-${{ matrix.goarch }} @@ -109,9 +111,10 @@ jobs: - name: Install AWS run: pip install awscli - name: Download Runner - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: dstack-runner + pattern: dstack-runner-* + merge-multiple: true path: runner - name: Upload to S3 working-directory: runner @@ -130,9 +133,9 @@ jobs: LATEST: ${{ steps.set_latest.outputs.LATEST }} name: Set latest variable steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies @@ -177,16 +180,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Build and upload to DockerHub run: | VERSION=${GITHUB_REF#refs/tags/} @@ -213,8 +216,8 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install AWS