Skip to content

Commit d95982f

Browse files
Add actions/dependency-review-action (#153)
* Add actions/dependency-review-action Add a GitHub Actions workflow that checks the licenses of dependencies, amongst other things. * Pin to 8.0.410 SDK Pin to the .NET 8.0.410 SDK to see if any updates for 8.0.411 broke things. * Use HTTPS Use HTTPS to `postman-echo.com` to avoid an HTTP 301 redirect.
1 parent 37b41e7 commit d95982f

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: dependency-review
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
permissions: {}
8+
9+
jobs:
10+
dependency-review:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
18+
- name: Checkout code
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
filter: 'tree:0'
22+
show-progress: false
23+
24+
- name: Review dependencies
25+
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
26+
with:
27+
allow-licenses: 'Apache-2.0,BSD-3-Clause,MIT'

examples/net8.0/aspnetcore/Controllers/HttpClientController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public async Task<ActionResult<IEnumerable<string>>> Get()
2121
[HttpGet]
2222
public async Task<ActionResult<IEnumerable<string>>> GetError()
2323
{
24-
var response = await client.GetAsync("http://postman-echo.com/status/500");
24+
var response = await client.GetAsync("https://postman-echo.com/status/500");
2525
var content = await response.Content.ReadAsStringAsync();
2626
return Ok(content);
2727
}

examples/net8.0/aspnetcore/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0.410@sha256:b56053d0a8f4627047740941396e76cd9e7a9421c83b1d81b68f10e5019862d7 AS build
22
ARG TARGETARCH
33
ARG CONFIGURATION="Release"
44
ARG DOTNET_PUBLISH_ARGS=""
@@ -11,7 +11,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1111
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
1212
dotnet publish "examples/net8.0/aspnetcore/aspnetcore.csproj" --arch "${TARGETARCH}" --configuration "${CONFIGURATION}" --output /app ${DOTNET_PUBLISH_ARGS}
1313

14-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS final
14+
FROM mcr.microsoft.com/dotnet/sdk:8.0.410@sha256:b56053d0a8f4627047740941396e76cd9e7a9421c83b1d81b68f10e5019862d7 AS final
1515
WORKDIR /app
1616
EXPOSE 8080
1717

0 commit comments

Comments
 (0)