Skip to content

Commit

Permalink
[Internal] Update GitHub Actions dependencies (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvstme authored Jul 24, 2024
1 parent a8a9928 commit e6d9048
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 46 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/close-inactive-issues.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Close inactive issues
on:
workflow_dispatch:
schedule:
- cron: "30 1 * * *"

Expand All @@ -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 }}
30 changes: 15 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand All @@ -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
Expand Down Expand Up @@ -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 }}"}'
Expand Down Expand Up @@ -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: '[email protected]'
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
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
matrix:
variant: [ "", "-cuda" ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup OCI config
run: |
mkdir ~/.oci
Expand Down Expand Up @@ -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"
Expand All @@ -255,7 +255,7 @@ jobs:
env:
CLI_VERSION: 0.113.0+Nebius-AI
- name: Write Nebius credentials
uses: jsdaniell/[email protected].2
uses: jsdaniell/[email protected].3
with:
name: "service_account.json"
json: ${{ secrets.NEBIUS_SERVICE_ACCOUNT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 23 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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/}
Expand All @@ -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
Expand Down

0 comments on commit e6d9048

Please sign in to comment.