summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2021-12-13 13:04:21 -0800
committerGravatar GitHub <noreply@github.com> 2021-12-13 13:04:21 -0800
commitddf45ada7124988a6bab779da0b690e649d201b0 (patch)
tree45595f1227d62faf738b48d9998646ed517f27c0
parentc3db1eb4ef80b45d52256bc57f5351579af41332 (diff)
downloadastro-ddf45ada7124988a6bab779da0b690e649d201b0.tar.gz
astro-ddf45ada7124988a6bab779da0b690e649d201b0.tar.zst
astro-ddf45ada7124988a6bab779da0b690e649d201b0.zip
add lockfile ci (#2173)
-rw-r--r--.github/workflows/nightly.yml69
-rw-r--r--.github/workflows/stat.yml30
2 files changed, 69 insertions, 30 deletions
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
new file mode 100644
index 000000000..81654b492
--- /dev/null
+++ b/.github/workflows/nightly.yml
@@ -0,0 +1,69 @@
+name: 'Nightly'
+
+on:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ - cron: '0 12 * * *'
+
+jobs:
+ stat:
+ if: github.repository_owner == 'withastro'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code using Git
+ uses: actions/checkout@v2
+ - name: Set Node version to 16
+ uses: actions/setup-node@v2
+ with:
+ node-version: 16
+ cache: 'yarn'
+ - name: Install dependencies
+ run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
+ - name: Collect stats
+ run: node scripts/stats/index.js
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Commit changes
+ uses: stefanzweifel/git-auto-commit-action@v4
+ with:
+ commit_message: '[ci] collect stats'
+ branch: ${{ github.head_ref }}
+
+ lockfile:
+ if: github.repository_owner == 'withastro'
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Check out code using Git
+ uses: actions/checkout@v2
+
+ - name: Set Node version to 16
+ uses: actions/setup-node@v2
+ with:
+ node-version: 16
+ cache: 'yarn'
+
+ - name: Clear lockfile
+ run: rm -rf yarn.lock node_modules
+
+ - name: Install dependencies
+ run: yarn install --ignore-engines --ignore-scripts
+
+ - name: Create Pull Request
+ id: createpr
+ uses: peter-evans/create-pull-request@v3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ commit-message: '[ci] update lockfile'
+ title: '[ci] update lockfile'
+ body: >
+ This PR is auto-generated by a nightly GitHub action.
+ It should automatically be merged if tests pass.
+
+ - name: Mark Pull Request for Auto-Merge
+ if: steps.createpr.outputs.pull-request-operation == 'created'
+ uses: peter-evans/enable-pull-request-automerge@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ pull-request-number: ${{ steps.createpr.outputs.pull-request-number }}
+ merge-method: squash \ No newline at end of file
diff --git a/.github/workflows/stat.yml b/.github/workflows/stat.yml
deleted file mode 100644
index da0c629f6..000000000
--- a/.github/workflows/stat.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: 'Collect Stats'
-
-on:
- schedule:
- # * is a special character in YAML so you have to quote this string
- - cron: '0 12 * * *'
-
-jobs:
- stat:
- if: github.repository_owner == 'withastro'
- runs-on: ubuntu-latest
- steps:
- - name: Check out code using Git
- uses: actions/checkout@v2
- - name: Set Node version to 16
- uses: actions/setup-node@v2
- with:
- node-version: 16
- cache: 'yarn'
- - name: Install dependencies
- run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- - name: Collect stats
- run: node scripts/stats/index.js
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Commit changes
- uses: stefanzweifel/git-auto-commit-action@v4
- with:
- commit_message: '[ci] collect stats'
- branch: ${{ github.head_ref }}