forked from henne49/dbus-opendtu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DevContainer and automatic versioning (henne49#158)
* add initial files * Fix typo in Dockerfile * Add GitVersion * Add version file * Update Dockerfile to optimize image layers and install GitVersion.Tool * Add GitVersion.yml configuration file * Add codeql workflow and dependencies
- Loading branch information
Showing
7 changed files
with
104 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:3 | ||
RUN pip install requests | ||
|
||
# Switch to the vscode user | ||
USER vscode | ||
|
||
WORKDIR /home/vscode | ||
|
||
# Update and install dependencies in a single RUN command to reduce image layers | ||
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \ | ||
chmod +x ./dotnet-install.sh && \ | ||
./dotnet-install.sh --version latest && \ | ||
rm dotnet-install.sh | ||
|
||
# Install GitVersion | ||
RUN /home/vscode/.dotnet/dotnet tool install --global GitVersion.Tool --version 5.* && \ | ||
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc && \ | ||
echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "Python Dev Container", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"features": { | ||
"docker-in-docker": { | ||
"version": "latest", | ||
"moby": true, | ||
"dockerDashComposeVersion": "v1" | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "Update Version" | ||
|
||
on: | ||
push: | ||
# tags: | ||
# - v* | ||
branches: ["main"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["main"] | ||
workflow_dispatch: | ||
jobs: | ||
versioning: | ||
name: Versioning | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: write | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: setup .net core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "8.0.x" | ||
|
||
- name: install gitversion | ||
uses: gittools/actions/gitversion/setup@v0 | ||
with: | ||
versionspec: "5.x" | ||
|
||
- name: Use GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/execute@v0 | ||
|
||
- name: Create version file | ||
run: | | ||
echo "Version: ${{ steps.gitversion.outputs.majorMinorPatch }}" > version.txt | ||
- name: Commit and push | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add version.txt | ||
git commit -m "Update version" | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mode: Mainline | ||
branches: {} | ||
ignore: | ||
sha: [] | ||
merge-message-formats: {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
# dbus-opendtu | ||
|
||
> **Attention:** | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Version: 1.1.20 |