deno-dependency #605
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deno-dependency | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "42 19 * * *" | |
jobs: | |
update-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
- name: Update dependencies | |
run: | | |
deno run -A https://deno.land/x/udd/main.ts src/import_map.json | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
id: pr | |
with: | |
commit-message: "chore(deps): update deno.lock" | |
title: "chore(deps): update deno.lock" | |
body: > | |
Dependencies updated by [udd](https://github.com/hayd/deno-udd). | |
branch: dependencies/deno-dependency-updates | |
author: GitHub <[email protected]> | |
delete-branch: true | |
- name: Retrieve commit sha | |
id: commit | |
run: | | |
echo "::set-output name=sha::$(git rev-parse HEAD)" | |
- name: Set commit status with pending | |
uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{ secrets.GITHUB_TOKEN }} | |
context: "Unit tests" | |
state: "pending" | |
sha: ${{ steps.commit.outputs.sha }} | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
- name: Config properties file | |
run: | | |
cp .env.defaults .env | |
rm deno.lock | |
- name: Unit tests | |
id: test | |
continue-on-error: true | |
run: | | |
deno test -A | |
- name: Set commit status with outcome | |
uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{ secrets.GITHUB_TOKEN }} | |
context: "Unit tests" | |
description: "To run other CI actions close/reopen this PR" | |
state: ${{ steps.test.outcome }} | |
sha: ${{ steps.commit.outputs.sha }} |