Skip to content

Commit

Permalink
Don't pin dependencies, add OS name and arch in Clippy check
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed May 29, 2023
1 parent 72f8efb commit 967b092
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@augu/clippy-action",
"description": "🐻‍❄️📦 GitHub action to run Clippy, an up-to-date and modern version of actions-rs/clippy",
"version": "1.1.1",
"version": "1.1.2",
"private": true,
"main": "build/main.js",
"author": "Noel Towa <cutie@floofy.dev>",
Expand All @@ -18,7 +18,7 @@
"dependencies": {
"@actions/core": "1.10.0",
"@actions/exec": "1.1.1",
"@actions/github": "^5.1.1",
"@actions/github": "5.1.1",
"@actions/io": "1.1.3",
"@noelware/utils": "2.3.0",
"zod": "3.21.4"
Expand Down
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { endGroup, error, info, startGroup } from '@actions/core';
import { getOctokit, context } from '@actions/github';
import { getInputs } from './inputs';
import * as clippy from './clippy';
import * as osInfo from './os-info';
import { which } from '@actions/io';

async function main() {
Expand Down Expand Up @@ -58,6 +59,8 @@ async function main() {
await clippy.renderMessages(pieces);

const annotations = clippy.kDefaultRenderer.annotations;
const os = osInfo.os.get();
const arch = osInfo.arch.get();
await client.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {
check_run_id: id,
owner: context.repo.owner,
Expand All @@ -66,7 +69,7 @@ async function main() {
output:
exitCode === 0
? {
title: 'Clippy Result',
title: `Clippy (${os} ${arch})`,
summary: 'Clippy ran successfully!',
annotations: annotations.map((anno) => ({
annotation_level: anno.level === 'error' ? ('failure' as const) : ('warning' as const),
Expand All @@ -80,7 +83,7 @@ async function main() {
}))
}
: {
title: 'Clippy failed',
title: `Clippy (${os} ${arch})`,
summary: `Running \`cargo clippy\` failed with exit code ${exitCode}`,
annotations: annotations.map((anno) => ({
annotation_level: anno.level === 'error' ? ('failure' as const) : ('warning' as const),
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ __metadata:
languageName: node
linkType: hard

"@actions/github@npm:^5.1.1":
"@actions/github@npm:5.1.1":
version: 5.1.1
resolution: "@actions/github@npm:5.1.1"
dependencies:
Expand Down Expand Up @@ -58,7 +58,7 @@ __metadata:
dependencies:
"@actions/core": 1.10.0
"@actions/exec": 1.1.1
"@actions/github": ^5.1.1
"@actions/github": 5.1.1
"@actions/io": 1.1.3
"@augu/eslint-config": 4.0.1
"@augu/tsconfig": 1.1.1
Expand Down

0 comments on commit 967b092

Please sign in to comment.