From 70f4ccfae6083ae2f5a68e59e2dd25df2e398bac Mon Sep 17 00:00:00 2001 From: Aaron <29749331+aarnphm@users.noreply.github.com> Date: Mon, 11 Sep 2023 15:09:49 -0400 Subject: [PATCH] fix(ratchet): lock correctly on cron job Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- .github/workflows/binary-releases.yml | 24 +++++------ .github/workflows/build-embedding.yml | 10 ++--- .github/workflows/build.yml | 10 ++--- .github/workflows/ci.yml | 18 ++++---- .github/workflows/cleanup.yml | 2 +- .github/workflows/clojure-frontend.yml | 6 +-- .github/workflows/compile-pypi.yml | 58 +++++++++++++------------- .github/workflows/create-releases.yml | 18 ++++---- .github/workflows/cron.yml | 6 +-- .github/workflows/release-notes.yml | 4 +- tools/update-actions.sh | 12 +++++- 11 files changed, 88 insertions(+), 80 deletions(-) diff --git a/.github/workflows/binary-releases.yml b/.github/workflows/binary-releases.yml index 4b7959cb..3722a2da 100644 --- a/.github/workflows/binary-releases.yml +++ b/.github/workflows/binary-releases.yml @@ -45,7 +45,7 @@ jobs: outputs: message: ${{ steps.commit_message.outputs.message }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -63,10 +63,10 @@ jobs: if: >- contains(needs.get_commit_message.outputs.message, '[binary build]') || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, '03 - Standalone Build')) || (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main'))) steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' - name: Pull latest change @@ -79,7 +79,7 @@ jobs: bash local.sh python -m build -sw openllm-python/ - name: Upload artifacts - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: binary-artefacts path: openllm-python/dist/* @@ -132,7 +132,7 @@ jobs: PYAPP_PIP_EXTERNAL: 'true' steps: - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - name: Pull latest change @@ -148,12 +148,12 @@ jobs: - name: Install Hatch run: pip install -U hatch - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@00b49be78f40fba4e87296b2ead62868750bdd83 # ratchet:dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@7270583354e7defc2a2693a5656e481365434ba2 # ratchet:dtolnay/rust-toolchain@stable with: targets: ${{ matrix.job.target }} - name: Set up cross compiling if: matrix.job.cross - uses: taiki-e/install-action@6801bd56b9711500292d943350f0b1f3559d7acb # ratchet:taiki-e/install-action@v2 + uses: taiki-e/install-action@63c295a1d121591e8dd1e152c88a8e9a9b1ecef5 # ratchet:taiki-e/install-action@v2 with: tool: cross - name: Configure cross compiling @@ -213,14 +213,14 @@ jobs: done - name: Upload staged archive if: runner.os != 'Linux' - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: staged-${{ runner.os }} path: openllm-python/packaging/* if-no-files-found: error - name: Upload archive if: runner.os == 'Linux' - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: standalone path: openllm-python/packaging/* @@ -237,7 +237,7 @@ jobs: working-directory: openllm-python steps: - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 - name: Set up Python uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # ratchet:actions/setup-python@v4 with: @@ -276,13 +276,13 @@ jobs: mkdir installers mv build/*/release/*/*.{exe,msi} installers - name: Upload binaries - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: standalone path: openllm-python/archives/* if-no-files-found: error - name: Upload installers - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: installers path: openllm-python/installers/* diff --git a/.github/workflows/build-embedding.yml b/.github/workflows/build-embedding.yml index 3cb8b984..f0fabf85 100644 --- a/.github/workflows/build-embedding.yml +++ b/.github/workflows/build-embedding.yml @@ -43,7 +43,7 @@ jobs: outputs: message: ${{ steps.commit_message.outputs.message }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -70,7 +70,7 @@ jobs: ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # ratchet:aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # ratchet:aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -98,10 +98,10 @@ jobs: id-token: write security-events: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version: '3.11' @@ -224,7 +224,7 @@ jobs: (contains(needs.get_commit_message.outputs.message, '[ec2 build]') || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, '00 - EC2 Build')) || (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main')))) && always() steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # ratchet:aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # ratchet:aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8482966..6ec97bbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: outputs: message: ${{ steps.commit_message.outputs.message }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -64,7 +64,7 @@ jobs: ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # ratchet:aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # ratchet:aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_PROD_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_PROD_SECRET_ACCESS_KEY }} @@ -95,7 +95,7 @@ jobs: id-token: write security-events: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 1 - name: Inject slug/short variables @@ -160,7 +160,7 @@ jobs: org.opencontainers.image.source="https://github.com/bentoml/OpenLLM" - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # ratchet:docker/build-push-action@v4 + uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # ratchet:docker/build-push-action@v4 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PROD_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PROD_SECRET_ACCESS_KEY }} @@ -221,7 +221,7 @@ jobs: (contains(needs.get_commit_message.outputs.message, '[ec2 build]') || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, '00 - EC2 Build')) || (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main')))) && always() steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # ratchet:aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # ratchet:aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_PROD_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_PROD_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 841f3919..930471ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ defaults: jobs: tests: runs-on: ${{ matrix.os }} - if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} + if: ${{ github.event_name == 'pull_request' || github.event_name == 'push'|| github.event_name == 'workflow_call' }} strategy: fail-fast: false matrix: @@ -44,11 +44,11 @@ jobs: - os: 'windows-latest' name: tests (${{ matrix.python-version }}.${{ matrix.os }}) steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version: ${{ matrix.python-version }} @@ -57,7 +57,7 @@ jobs: - name: Disambiguate coverage filename run: mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}" - name: Upload coverage data - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: coverage-data path: .coverage.* @@ -67,11 +67,11 @@ jobs: if: false needs: tests steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version-file: .python-version-default @@ -86,7 +86,7 @@ jobs: hatch run coverage:report-xml openllm-python hatch run coverage:report-uncovered-html openllm-python - name: Upload uncovered HTML report - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: uncovered-html-report path: htmlcov @@ -106,14 +106,14 @@ jobs: env: HYPERFINE_VERSION: '1.12.0' steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - name: Install hyperfine run: | wget https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/hyperfine_${HYPERFINE_VERSION}_amd64.deb sudo dpkg -i hyperfine_${HYPERFINE_VERSION}_amd64.deb - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version-file: .python-version-default diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 3a36392d..6c2f2227 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -9,7 +9,7 @@ jobs: if: "github.repository == 'bentoml/OpenLLM'" # Don't run on fork repository steps: - name: Check out code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 - name: Cleanup run: "gh extension install actions/gh-actions-cache\n\nREPO=${{ github.repository }}\nBRANCH=\"refs/pull/${{ github.event.pull_request.number }}/merge\"\n\necho \"Fetching list of cache key\"\ncacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )\n\n## Setting this to not fail the workflow while deleting cache keys. \nset +e\necho \"Deleting caches...\"\nfor cacheKey in $cacheKeysForPR\ndo\n gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm\ndone\necho \"Done\"\n" env: diff --git a/.github/workflows/clojure-frontend.yml b/.github/workflows/clojure-frontend.yml index ce671449..51330df8 100644 --- a/.github/workflows/clojure-frontend.yml +++ b/.github/workflows/clojure-frontend.yml @@ -26,7 +26,7 @@ jobs: outputs: message: ${{ steps.commit_message.outputs.message }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -54,7 +54,7 @@ jobs: id-token: write security-events: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 1 - name: Inject slug/short variables @@ -100,7 +100,7 @@ jobs: type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }} - name: Build and push Clojure UI image id: build-and-push - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # ratchet:docker/build-push-action@v4 + uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # ratchet:docker/build-push-action@v4 with: context: openllm-contrib/clojure file: openllm-contrib/clojure/Dockerfile diff --git a/.github/workflows/compile-pypi.yml b/.github/workflows/compile-pypi.yml index 80f92d8a..0084f807 100644 --- a/.github/workflows/compile-pypi.yml +++ b/.github/workflows/compile-pypi.yml @@ -54,7 +54,7 @@ jobs: outputs: message: ${{ steps.commit_message.outputs.message }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -76,11 +76,11 @@ jobs: matrix: directory: ["openllm-core", "openllm-python", "openllm-client"] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 ref: '${{ inputs.tags }}' - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version-file: .python-version-default @@ -88,7 +88,7 @@ jobs: run: hatch build working-directory: ${{ matrix.directory }} - name: Upload artifacts - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: python-artefacts path: ${{ matrix.directory }}/dist/* @@ -112,11 +112,11 @@ jobs: directory: ["openllm-core", "openllm-python", "openllm-client"] needs: get_commit_message steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 ref: '${{ inputs.tags }}' - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version: '3.8' @@ -130,7 +130,7 @@ jobs: CIBW_ARCHS_MACOS: "${{ matrix.buildplatform[2] }}" MYPYPATH: /project/typings - name: Upload wheels as workflow artifacts - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # ratchet:actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 with: name: ${{ matrix.buildplatform[1] }}-mypyc-wheels path: ./wheelhouse/*.whl @@ -146,28 +146,28 @@ jobs: with: name: python-artefacts path: dist - # - name: Download Linux x86_64 compiled artifacts - # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 - # with: - # name: linux-x86_64-mypyc-wheels - # path: dist - # - name: Download MacOS x86_64 compiled artifacts - # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 - # with: - # name: macos-x86_64-mypyc-wheels - # path: dist - # - name: Download MacOS arm64 compiled artifacts - # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 - # with: - # name: macos-arm64-mypyc-wheels - # path: dist - # - name: Download MacOS universal2 compiled artifacts - # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 - # with: - # name: macos-universal2-mypyc-wheels - # path: dist - # - name: dry ls - # run: ls -rthlaR + # - name: Download Linux x86_64 compiled artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 + # with: + # name: linux-x86_64-mypyc-wheels + # path: dist + # - name: Download MacOS x86_64 compiled artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 + # with: + # name: macos-x86_64-mypyc-wheels + # path: dist + # - name: Download MacOS arm64 compiled artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 + # with: + # name: macos-arm64-mypyc-wheels + # path: dist + # - name: Download MacOS universal2 compiled artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3 + # with: + # name: macos-universal2-mypyc-wheels + # path: dist + # - name: dry ls + # run: ls -rthlaR push-nightly: name: Push nightly wheels if: ${{ !github.event.repository.fork && github.event_name == 'push' }} diff --git a/.github/workflows/create-releases.yml b/.github/workflows/create-releases.yml index a6a4d059..ec277d6f 100644 --- a/.github/workflows/create-releases.yml +++ b/.github/workflows/create-releases.yml @@ -30,17 +30,17 @@ jobs: outputs: version: ${{ steps.version.outputs.version }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.OPENLLM_PAT }} - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version-file: .python-version-default - name: Import bot's GPG key for signing commits id: import-gpg - uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -78,7 +78,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: ref: '${{ needs.release.outputs.version }}' token: ${{ secrets.OPENLLM_PAT }} @@ -124,7 +124,7 @@ jobs: contents: write id-token: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - name: Setup python @@ -137,7 +137,7 @@ jobs: run: sudo apt-get install -y jq curl - name: Import bot's GPG key for signing commits id: import-gpg-key - uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -199,10 +199,10 @@ jobs: contents: write id-token: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version-file: .python-version-default @@ -210,7 +210,7 @@ jobs: run: sudo apt-get install -y jq curl - name: Import bot's GPG key for signing commits id: import-gpg-key - uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 82f640b6..9f888132 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -27,14 +27,14 @@ jobs: env: ACTIONS_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 - name: Install jq and curl run: sudo apt-get install -y jq curl - name: Import bot's GPG key for signing commits id: import-gpg-key - uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # ratchet:crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -44,7 +44,7 @@ jobs: - name: Locking dependencies run: bash ./tools/update-actions.sh - name: Create a PR - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # ratchet:peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # ratchet:peter-evans/create-pull-request@v4 env: GIT_AUTHOR_NAME: ${{ steps.import-gpg-key.outputs.name }} GIT_AUTHOR_EMAIL: ${{ steps.import-gpg-key.outputs.email }} diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 48273010..9b04a158 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -24,11 +24,11 @@ jobs: contents: write id-token: write steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v3 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # ratchet:actions/checkout@v4 with: fetch-depth: 0 ref: '${{ inputs.tags }}' - - uses: bentoml/setup-bentoml-action@d4010d8303684b183f45b33c6a44644f81337bdb # ratchet:bentoml/setup-bentoml-action@v1 + - uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1 with: bentoml-version: 'main' python-version-file: .python-version-default diff --git a/tools/update-actions.sh b/tools/update-actions.sh index 188c82a9..42f9c669 100755 --- a/tools/update-actions.sh +++ b/tools/update-actions.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash -set -ex +set -e + +DEBUG=${DEBUG:-false} +[[ "${DEBUG}" == "true" ]] && set -x GIT_ROOT=$(git rev-parse --show-toplevel) @@ -11,4 +14,9 @@ cd "$GIT_ROOT" || exit 1 exit 1 ) -find "${GIT_ROOT}/.github/workflows" -type f -iname '*.yml' -exec docker run -it --rm -v "${PWD}":"${PWD}" -w "${PWD}" -e RATCHET_EXP_KEEP_NEWLINES=true ghcr.io/sethvargo/ratchet:0.4.0 update {} \; +[[ -z "${ACTIONS_TOKEN}" ]] && ( + echo "ACTIONS_TOKEN not found. Make sure to have ACTIONS_TOKEN set to run this job." + exit 1 +) + +find "${GIT_ROOT}/.github/workflows" -type f -iname '*.yml' -exec docker run --rm -v "${PWD}":"${PWD}" -w "${PWD}" -e ACTIONS_TOKEN -e RATCHET_EXP_KEEP_NEWLINES=true ghcr.io/sethvargo/ratchet:0.4.0 update {} \;