Skip to content

Commit 8b2dd96

Browse files
committed
Merge branch 'dev' into pr/remove-jsons
Signed-off-by: Yasumasa Suenaga <[email protected]>
2 parents a6fae2d + fedbb6d commit 8b2dd96

File tree

386 files changed

+14910
-24578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+14910
-24578
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0
22

33
RUN apt-get update
44

.devcontainer/devcontainer.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
1414
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
1515
// "appPort": [],
16+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
17+
"forwardPorts": [5073],
18+
// "portsAttributes": {
19+
// "5073": {
20+
// "protocol": "https"
21+
// }
22+
// },
1623

1724
// Uncomment the next line to run commands after the container is created.
1825
// "postCreateCommand": "rustc --version",
@@ -25,9 +32,22 @@
2532

2633
// Uncomment the line below to mount your local usersecrets into the devcontainer from a Mac/Linux OS
2734
// "mounts": [ "source=${localEnv:HOME}/.microsoft/usersecrets,target=/root/.microsoft/usersecrets,type=bind" ],
35+
"features": {
36+
"ghcr.io/devcontainers/features/github-cli:1": {}
37+
},
2838

2939
// Add the IDs of extensions you want installed when the container is created in the array below.
30-
"extensions": [
31-
"ms-dotnettools.csharp"
32-
]
40+
"customizations": {
41+
"vscode": {
42+
"extensions": [
43+
"ms-vscode.vscode-node-azure-pack",
44+
"GitHub.copilot",
45+
"GitHub.vscode-github-actions",
46+
"GitHub.copilot-chat",
47+
"ms-dotnettools.vscode-dotnet-runtime",
48+
"ms-dotnettools.csdevkit",
49+
"ms-dotnetools.csharp"
50+
]
51+
}
52+
}
3353
}

.github/ISSUE_TEMPLATE/agenda-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: ''
88
---
99

1010
## Date
11-
YYYY-MM-DD - 8am UTC
11+
YYYY-MM-DD - 7am UTC
1212

1313
## Meeting notices
1414

@@ -18,7 +18,7 @@ Linux Foundation meetings involve participation by industry competitors, and it
1818
Examples of types of actions that are prohibited at Linux Foundation meetings and in connection with Linux Foundation activities are described in the Linux Foundation Antitrust Policy available at http://www.linuxfoundation.org/antitrust-policy. If you have questions about these matters, please contact your company counsel, or if you are a member of the Linux Foundation, feel free to contact Andrew Updegrove of the firm of Gesmer Updegrove LLP, which provides legal counsel to the Linux Foundation.
1919

2020
### Recordings
21-
GSF project meetings may be recorded for use solely by the GSF team for administration purposes. In very limited instances, and with explicit approval, recordings may be made more widely available.
21+
We're happy to start recording these meetings if we receive any requests to record them.
2222

2323
### Roll Call
2424
Please *add a comment* to this issue during the meeting to denote attendance.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Case-study template
3+
about: Case-study submissions
4+
title: Case-study submissions
5+
labels: Case-study submissions
6+
assignees: vaughanknight
7+
8+
---
9+
10+
# Case Study Template
11+
12+
*This is a template to use for case studies that are submitted that leverage the Carbon Aware SDK. These case studies will be published to the Carbon Aware SDK repository*
13+
14+
> We will contact the person who created this issue to follow up prior to publishing any case studies for clarification and alignment
15+
16+
*Please delete the text in italics and replace it with the appropriate information.*
17+
18+
*For more information on any of the items, the final reference is the [SCI Specification](https://github.com/Green-Software-Foundation/software_carbon_intensity/blob/main/Software_Carbon_Intensity/Software_Carbon_Intensity_Specification.md)*
19+
20+
*If you find errors, or have further questions, please feel free to raise an [issue](https://github.com/Green-Software-Foundation/carbon-aware-sdk/issues).*
21+
22+
## Overview
23+
24+
_Please provide information describing the use case in a few bullet points_
25+
26+
## Describe the solution that implements the Carbon Aware SDK
27+
28+
_A textual description of the solution that implements the Carbon Aware SDK_
29+
30+
_A textual description of the action that is taken that reduces emissiosn due to leveraging the Carbon Aware SDK_
31+
32+
## Architecture for the solution (if applicable)
33+
34+
_An architecture diagram of the solution described in this use case_
35+
36+
### Technical details of the components in the architecture
37+
38+
_Textual description with technical details of each component provided in the architecture diagram_
39+
40+
## Carbon Aware SDK impact (both emissions impact and business impact)
41+
42+
_Textual description of the emissions impact and how it was measured_
43+
44+
_Textual description of the business impact beyond the emissions impact (if applicable)_
45+
46+
## Any public press release information that relates to the
47+
48+
_Titles and links to press releases that can be viewed publicly online_
49+
50+
## Any other notes of significance
51+
52+
_For example_
53+
54+
_Was the SCI used?_
55+
56+
_Was this built in conjuction with another party that should be included in the case study?_
57+
58+
_Was there a contribution back to the Carbon Aware SDK project as part of this?_
59+
60+
_Are there any further plans to implement the Carbon Aware SDK across other solutions that can be discussed?_
61+
62+
_Are there any further plans to leverage other aspects of the Green Software Foundation to drive positive impact with software?_
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Documentation Change
2+
description: Suggest a change to documentation
3+
title: "Documentation: "
4+
labels: ["documentation"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for helping us maintain the CASDK documentation! If you'd just like to fix spelling/typos in the current documentation,
10+
feel free to submit a pull request without raising an issue. If you'd like to change the content of current documentation,
11+
please submit this issue to explain the purpose of the change.
12+
- type: input
13+
id: contact
14+
attributes:
15+
label: Contact Details
16+
description: How can we get in touch with you if we need more info?
17+
placeholder: ex. [email protected]
18+
validations:
19+
required: false
20+
- type: textarea
21+
id: overview
22+
attributes:
23+
label: Overview of Change
24+
description: Please give a brief overview of your intended change. What is the purpose of the change and what content will be impacted?
25+
placeholder: Explain change
26+
value: "Describe change"
27+
validations:
28+
required: true
29+
- type: checkboxes
30+
id: terms
31+
attributes:
32+
label: Code of Conduct
33+
description: By submitting this issue, you agree to follow the [Way We Work](https://github.com/Green-Software-Foundation/standards_wg/blob/main/the_way_we_work.md)
34+
options:
35+
- label: I agree to follow this project's Code of Conduct
36+
required: true

.github/workflows/1-pr.yaml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
# web app
99
DOCKERFILE_PATH: "CarbonAware.WebApi/src/Dockerfile"
1010
HEALTH_ENDPOINT: "0.0.0.0:8080/health"
11-
DLL_FILE_PATH: "./bin/Release/net6.0/CarbonAware.WebApi.dll"
11+
DLL_FILE_PATH: "./bin/Release/net8.0/CarbonAware.WebApi.dll"
1212
DOTNET_SRC_DIR: "./src"
1313
# console app packages
1414
DOTNET_SOLUTION: "src/GSF.CarbonAware/src/GSF.CarbonAware.csproj"
@@ -40,9 +40,9 @@ jobs:
4040

4141
- uses: actions/checkout@v2
4242
- name: Setup .NET
43-
uses: actions/setup-dotnet@v1
43+
uses: actions/setup-dotnet@v3
4444
with:
45-
dotnet-version: 6.0.x
45+
dotnet-version: 8.0.x
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
@@ -86,14 +86,14 @@ jobs:
8686
needs: sln-build-and-test
8787
runs-on: ubuntu-latest
8888
container:
89-
image: mcr.microsoft.com/dotnet/sdk:6.0
89+
image: mcr.microsoft.com/dotnet/sdk:8.0
9090
steps:
9191
- uses: actions/checkout@v3
9292

93-
- name: Setup .NET Core SDK 6
94-
uses: actions/setup-dotnet@v2
93+
- name: Setup .NET Core SDK 8
94+
uses: actions/setup-dotnet@v3
9595
with:
96-
dotnet-version: '6.0.x'
96+
dotnet-version: '8.0.x'
9797
include-prerelease: false
9898

9999
- name: Install dependencies
@@ -126,10 +126,12 @@ jobs:
126126
DataSources__EmissionsDataSource: Json
127127
DataSources__Configurations__Json__Type: JSON
128128
run: dotnet tool run swagger tofile --output ./wwwroot/api/v1/swagger.yaml --yaml ${{ env.DLL_FILE_PATH }} v1
129+
env:
130+
DOTNET_ROLL_FORWARD: LatestMajor
129131
working-directory: ./src/CarbonAware.WebApi/src
130132

131133
- name: Upload swagger artifact
132-
uses: actions/upload-artifact@v1
134+
uses: actions/upload-artifact@v4
133135
with:
134136
name: pr-swagger.yaml
135137
path: src/CarbonAware.WebApi/src/wwwroot/api/v1/swagger.yaml
@@ -147,7 +149,7 @@ jobs:
147149

148150
- name: Docker Run Container
149151
run: |
150-
docker run -d --name runnable-container -e DataSources__EmissionsDataSource=Json -e DataSources__Configurations__Json__Type=JSON -p 8080:80 ca-api
152+
docker run -d --name runnable-container -e DataSources__EmissionsDataSource=Json -e DataSources__Configurations__Json__Type=JSON -p 8080:8080 ca-api
151153
docker container ls
152154
153155
- name: Docker WGET Health Endpoint
@@ -167,10 +169,10 @@ jobs:
167169
uses: actions/checkout@v3
168170
with:
169171
ref: dev
170-
- name: Setup .NET Core SDK 6
171-
uses: actions/setup-dotnet@v2
172+
- name: Setup .NET Core SDK 8
173+
uses: actions/setup-dotnet@v3
172174
with:
173-
dotnet-version: '6.0.x'
175+
dotnet-version: '8.0.x'
174176
include-prerelease: false
175177
- name: Install dependencies
176178
run: dotnet restore
@@ -182,12 +184,14 @@ jobs:
182184
working-directory: ${{ env.DOTNET_SRC_DIR }}
183185
- name: Generate Open API
184186
run: dotnet tool run swagger tofile --output ./wwwroot/api/v1/swagger.yaml --yaml ${{ env.DLL_FILE_PATH }} v1
187+
env:
188+
DOTNET_ROLL_FORWARD: LatestMajor
185189
- name: Upload dev artifact
186-
uses: actions/upload-artifact@v1
190+
uses: actions/upload-artifact@v4
187191
with:
188192
name: dev-swagger.yaml
189193
path: src/CarbonAware.WebApi/src/wwwroot/api/v1/swagger.yaml
190-
- uses: actions/download-artifact@v3
194+
- uses: actions/download-artifact@v4
191195
with:
192196
name: pr-swagger.yaml
193197
path: ./src/CarbonAware.WebApi/src/wwwroot/api/v1/pr-swagger.yaml
@@ -202,10 +206,10 @@ jobs:
202206
- name: Checkout
203207
uses: actions/checkout@v3
204208

205-
- name: Setup .NET Core SDK 6
206-
uses: actions/setup-dotnet@v2
209+
- name: Setup .NET Core SDK 8
210+
uses: actions/setup-dotnet@v3
207211
with:
208-
dotnet-version: '6.0.x'
212+
dotnet-version: '8.0.x'
209213
include-prerelease: false
210214

211215
- name: Create packages

.github/workflows/2-pre-release.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
permissions:
2424
packages: write
2525
steps:
26-
- name: Set up QEMU
27-
uses: docker/setup-qemu-action@v2
2826
- name: Set up Docker Buildx
2927
uses: docker/setup-buildx-action@v2
3028
- name: Log in to the Container registry

.github/workflows/4-release.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ env:
99
IMAGE_NAME: ${{ github.repository }}
1010

1111
jobs:
12+
detect-current-api-version:
13+
uses: ./.github/workflows/detect-webapi-version.yaml
14+
with:
15+
# We cannot use environment variables here due to workflow limitation.
16+
# https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#limitations
17+
registry: ghcr.io
18+
image-repo: ${{ github.repository }}
19+
1220
publish-container-image:
1321
runs-on: ubuntu-latest
22+
needs: detect-current-api-version
1423
permissions:
1524
packages: write
1625
steps:
17-
- name: Set up QEMU
18-
uses: docker/setup-qemu-action@v2
1926
- name: Set up Docker Buildx
2027
uses: docker/setup-buildx-action@v2
2128
- name: Log in to the Container registry
@@ -41,3 +48,28 @@ jobs:
4148
tags: ${{ steps.meta.outputs.tags }}
4249
labels: ${{ steps.meta.outputs.labels }}
4350
provenance: false
51+
52+
detect-newer-api-version:
53+
needs: publish-container-image
54+
uses: ./.github/workflows/detect-webapi-version.yaml
55+
with:
56+
# We cannot use environment variables here due to workflow limitation.
57+
# https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#limitations
58+
registry: ghcr.io
59+
image-repo: ${{ github.repository }}
60+
61+
generate-webapi-clients:
62+
needs:
63+
- detect-current-api-version
64+
- detect-newer-api-version
65+
if: ${{ needs.detect-current-api-version.outputs.apiver != needs.detect-newer-api-version.outputs.apiver }}
66+
uses: ./.github/workflows/4.a-generate-webapi-clients.yaml
67+
permissions:
68+
contents: write
69+
packages: write
70+
pull-requests: write
71+
with:
72+
# We cannot use environment variables here due to workflow limitation.
73+
# https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#limitations
74+
registry: ghcr.io
75+
image-repo: ${{ github.repository }}

0 commit comments

Comments
 (0)