From e044faa3d0972bc8b6e6e77db697d9e643a9badc Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 1 Jun 2022 16:45:56 +0200 Subject: [PATCH 1/3] ci: fix the Sync workflow --- .github/workflows/sync.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 8702e2e3f..1ba067c16 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -3,7 +3,8 @@ name: Version Sync on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + # Run once a week at 00:05 AM UTC on Sunday. + - cron: 5 0 * * 0 jobs: build: @@ -15,7 +16,7 @@ jobs: - name: Install Node uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: lts/* - name: "Update the package manager versions" run: | @@ -24,7 +25,7 @@ jobs: LATEST_YARN=$(curl https://registry.npmjs.org/yarn | jq '.["dist-tags"].latest') LATEST_BERRY=$(curl https://repo.yarnpkg.com/tags | jq '.latest.stable') - jq < config.json > config.json.new '. * '"{ + git --no-pager show HEAD:config.json | jq '. * '"{ definitions: { npm: { default: $LATEST_NPM, @@ -39,16 +40,15 @@ jobs: }, }, }, - }" + }" > config.json - rm config.json - mv config.json.new config.json - - if [[ ! -z "$(git status --porcelain)" ]]; then - git config user.email 'github-bot@iojs.org' - git config user.name 'Node.js GitHub Bot' - - git add config.json - git commit -m 'chore: update package manager versions' - git push - fi + - uses: gr2m/create-or-update-pull-request-action@v1 + # Creates a PR or update the Action's existing PR, or + # no-op if the base branch is already up-to-date. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: This is an automated update of package manager versions + branch: actions/tools-update-config.json + commit-message: "chore: update package manager versions" + title: "chore: update package manager versions" From 89080c68f33280b6d51936cfac4a901861e2dd08 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 1 Jun 2022 17:12:09 +0200 Subject: [PATCH 2/3] Update .github/workflows/sync.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maƫl Nison --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 1ba067c16..1c922ca54 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -42,7 +42,7 @@ jobs: }, }" > config.json - - uses: gr2m/create-or-update-pull-request-action@v1 + - uses: gr2m/create-or-update-pull-request-action@466b1b84c3291c6c69bc56377a6de54a1f4a297c # Creates a PR or update the Action's existing PR, or # no-op if the base branch is already up-to-date. env: From 80ca7e82cf21f0d06be9d0e428d40a95e5e9f33e Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 1 Jun 2022 17:52:21 +0200 Subject: [PATCH 3/3] Update .github/workflows/sync.yml Co-authored-by: Kristoffer K. --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 1c922ca54..b4108e974 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -3,7 +3,7 @@ name: Version Sync on: workflow_dispatch: schedule: - # Run once a week at 00:05 AM UTC on Sunday. + # Run once a week at 00:05 UTC on Sunday. - cron: 5 0 * * 0 jobs: