Azure / Azure/azure-rest-api-specs

[.github] Add shared action `upload-job-summary`

Open
#40,945 0 comments 0 reactions 1 assignee Claimed by @mikeharder View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

replace duplicate code like this in several workflows:

```yaml
- if: ${{ always() && steps.generate-job-summary.outputs.summary }}
name: Set job-summary artifact
uses: actions/upload-artifact@v7
with:
name: job-summary
path: ${{ steps.generate-job-summary.outputs.summary }}
# If the file doesn't exist, just don't add the artifact
if-no-files-found: ignore
```

with a call to a reusable action:

```yaml
- if: ${{ always() && steps.generate-job-summary.outputs.summary }}
name: Set job-summary artifact
uses: ./.github/actions/upload-job-summary
with:
path: ${{ steps.generate-job-summary.outputs.summary }}
```

This removes a few lines of duplicate code (`name`, `if-no-files-found`). But more importantly, it gives us a reusable action we can update in a single place, for example if we want to start using unzipped uploads.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.