From 820c052301eb1730ba44a7d93e8e0aef0141e6a6 Mon Sep 17 00:00:00 2001 From: statiolake Date: Sat, 11 Jan 2020 21:07:35 +0900 Subject: [PATCH] Stop auto crate update checker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 言語アップデート作業シートの方で Rust の対応を開始する動きがあったため、 自動更新を停止する。 --- .github/workflows/update.yml | 102 ----------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml deleted file mode 100644 index 4aca93d..0000000 --- a/.github/workflows/update.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Update - -on: - schedule: - # The scheduled jobs run only on `master`. Then we checkout `ja-all-enabled`. - # - - cron: "0 0 * * *" - push: - branches: - - master - - ja-all-enabled - -jobs: - update: - name: Update - runs-on: ubuntu-18.04 - - steps: - - name: checkout - uses: actions/checkout@v2 - with: - ref: ja-all-enabled - - - name: setup-python - uses: actions/setup-python@v1 - with: - python-version: 3.8.0 - - - name: rust-toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable-x86_64-unknown-linux-gnu - default: true - profile: minimal - - - name: "`cargo install --debug --bin cargo-add cargo-edit`" - uses: actions-rs/cargo@v1 - with: - command: install - args: --debug --bin cargo-add cargo-edit - - - name: "`cargo install --debug cargo-outdated`" - uses: actions-rs/cargo@v1 - with: - command: install - args: --debug cargo-outdated - - - name: Upgrade the dependencies - id: upgrade - run: | - import json - import subprocess - from collections import defaultdict - - cargo_outdated = json.loads(subprocess.run( - ['cargo', 'outdated', '--format', 'json', '-d', '1'], - stdout=subprocess.PIPE, check=True, - ).stdout.decode('utf8')) - - crates = defaultdict(list) - body = '' - if body == '': - body = 'Only dependencies of dependencies.' - - for target, crates in crates.items(): - args = ['cargo', 'add'] - if target: - args.extend(['--target', target]) - args.extend(f'{name}@={ver}' for name, ver in crates) - subprocess.run(args, check=True) - - print(f'::set-output name=body::{body}') - shell: python3 {0} - - - name: "`cargo update`" - uses: actions-rs/cargo@v1 - with: - command: update - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v2 - with: - token: ${{ secrets.REPO_SCOPED_TOKEN }} - commit-message: "[bot] Update the crates" - title: "[bot] Update the crates" - body: ${{ steps.upgrade.outputs.body }} - branch: ja-all-enabled-update-the-crates - base: ja-all-enabled