diff options
| author | seth <[email protected]> | 2024-02-12 20:29:15 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-13 00:24:08 -0500 |
| commit | 2cbc22348ef038181e1dc89635a3be005604a4ca (patch) | |
| tree | 33a33ffe0203b730078d01c5d7d3951239619ca9 /.github | |
| parent | 05780c6b2d8b184122a32095c50363a6c8617d64 (diff) | |
back to astro
Diffstat (limited to '.github')
| -rw-r--r-- | .github/dependabot.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/autobot.yaml | 28 | ||||
| -rw-r--r-- | .github/workflows/ci.yaml | 70 | ||||
| -rw-r--r-- | .github/workflows/update-flake.yaml | 11 |
4 files changed, 72 insertions, 43 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ba00ea5..5f2cb61 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,9 @@ updates: interval: "weekly" commit-message: prefix: "deps(actions)" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + commit-message: "deps(node)" diff --git a/.github/workflows/autobot.yaml b/.github/workflows/autobot.yaml new file mode 100644 index 0000000..89af037 --- /dev/null +++ b/.github/workflows/autobot.yaml @@ -0,0 +1,28 @@ +name: Auto-merge Dependabot + +on: pull_request + +jobs: + automerge: + name: Check and merge PR + runs-on: ubuntu-latest + + permissions: + actions: write + contents: write + pull-requests: write + + if: github.actor == 'dependabot[bot]' + + steps: + - uses: dependabot/fetch-metadata@v1 + id: metadata + with: + github-token: ${{ github.token }} + + - name: Enable auto-merge + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' + run: gh pr merge --auto --rebase "$PR" + env: + GH_TOKEN: ${{ github.token }} + PR: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11c4a50..28fd567 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,46 +6,52 @@ on: pull_request: workflow_dispatch: +env: + NODE_VERSION: 20 + jobs: - build: - name: Build + ci: + strategy: + matrix: + include: + - name: Build + command: build + - name: Lint + command: lint + + name: ${{ matrix.name }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup Deno - uses: nekowinston/setup-deno@v1 - - - name: Run build - run: | - deno task build - - format: - name: Format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 + - name: Setup node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} - - name: Setup Deno - uses: nekowinston/setup-deno@v1 + - name: Setup pnpm + uses: pnpm/action-setup@v3 - - name: Run format + - name: Get pnpm store directory + id: store-path run: | - deno fmt --check - - lint: - name: Lint - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup Deno - uses: nekowinston/setup-deno@v1 + echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + + - name: Setup pnpm cache + uses: actions/cache@v4 + env: + STORE_PATH: ${{ steps.store-path.outputs.STORE_PATH }} + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: | + pnpm install --frozen-lockfile - - name: Run lint + - name: Run ${{ matrix.command }} run: | - deno lint --compact || true - deno lint + pnpm run ${{ matrix.command }} diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml index 0e6158c..a274859 100644 --- a/.github/workflows/update-flake.yaml +++ b/.github/workflows/update-flake.yaml @@ -23,14 +23,3 @@ jobs: - name: Update lockfile & make PR uses: DeterminateSystems/update-flake-lock@v20 id: update - with: - commit-msg: "flake: update inputs" - pr-title: "flake: update inputs" - token: ${{ github.token }} - - - name: Enable auto-merge - shell: bash - run: gh pr merge --rebase "$PR_ID" - env: - GH_TOKEN: ${{ github.token }} - PR_ID: ${{ steps.update.outputs.pull-request-number }} |
