Skip to content

Instantly share code, notes, and snippets.

@landsman
Created February 17, 2025 19:27
Show Gist options
  • Save landsman/357b960c063a743c838ec531c55e82b2 to your computer and use it in GitHub Desktop.
Save landsman/357b960c063a743c838ec531c55e82b2 to your computer and use it in GitHub Desktop.
GitHub Aciton for Deno
name: Check Web
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- ".github/workflows/test-web.yml"
- "src/web/**"
- "!**.md"
workflow_dispatch:
permissions:
pull-requests: write
jobs:
qa:
environment: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Build
run: |
cd src/web
deno task build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./src/web/dist
- name: Outdated packages - check
id: outdated
run: |
OUTDATED="$(deno outdated -qr)"
if [ -z "$OUTDATED" ]; then
echo "none" > outdated.md
else
echo "$OUTDATED" | sed -r 's/\x1B\[[0-9;]*[mK]//g' > outdated.md
fi
echo "result<<EOF" >> "$GITHUB_OUTPUT"
echo '```text' >> "$GITHUB_OUTPUT"
cat outdated.md >> "$GITHUB_OUTPUT"
echo '```' >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Outdated packages - post
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
header: outdated
message: |
Outdated Dependencies
${{ steps.outdated.outputs.result }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment