Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/common/set_netdaemon_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
set_version_in_source:
name: 📆 Set version in code and docker files
runs-on: ubuntu-latest
steps:
run: |
echo setting source version: ${{ inputs.version }}
sed -i '/ private const string Version = /c\ private const string Version = "${{ inputs.version }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="${{ inputs.version }}"' ${{github.workspace}}/Dockerfile.AddOn
8 changes: 4 additions & 4 deletions .github/workflows/push_docker_dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Publish tags to docker hub
name: 📦 Deploy dev and appmodel docker
name: 📦 Deploy dev docker
on:
push:
branches:
Expand All @@ -14,9 +14,9 @@ jobs:
- name: 📤 Checkout the repository
uses: actions/checkout@main
- name: 📆 Set version number
run: |
sed -i '/ private const string Version = /c\ private const string Version = "dev";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="dev" \\' ${{github.workspace}}/Dockerfile.AddOn
uses: net-daemon/netdaemon/.github/workflows/common/set_netdaemon_version.yml
with:
version: dev
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
- name: 🔧 Set up Docker Buildx
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push_docker_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
- name: 📤 Checkout the repository
uses: actions/checkout@main
- name: 📆 Set version number
run: |
sed -i '/ private const string Version = /c\ private const string Version = "feature-${{ github.event.inputs.tag }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature-${{ github.event.inputs.tag }}" \\' ${{github.workspace}}/Dockerfile.AddOn
uses: net-daemon/netdaemon/.github/workflows/common/set_netdaemon_version.yml
with:
version: feature-${{ github.event.inputs.tag }}
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
- name: 🔧 Set up Docker Buildx
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tags_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
echo Current version: $latest
echo "::set-output name=version::$latest"
- name: 📆 Set version number
run: |
sed -i '/ private const string Version = /c\ private const string Version = "${{ steps.version.outputs.version }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="${{ steps.version.outputs.version }}" \\' ${{github.workspace}}/Dockerfile.AddOn
uses: net-daemon/netdaemon/.github/workflows/common/set_netdaemon_version.yml
with:
version: ${{ steps.version.outputs.version }}
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
- name: 🔧 Set up Docker Buildx
Expand Down