Skip to content

24.50.0

24.50.0 #216

Workflow file for this run

#### Publish on release or pre-release
name: 📦 Deploy to Docker rel
on:
release:
types:
- released
jobs:
deploy_docker_addon:
name: 📦 Deploy to Docker add-on
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
- name: ⏭️ Get next version
id: version
run: |
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
echo Current version: $latest
echo "::set-output name=version::$latest"
- name: 📆 Set version number
run: |
echo setting source version: ${{ steps.version.outputs.version }}
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
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: 🔓 Login to Docker hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: 🔓 Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🛠️ Run Buildx
run: |
docker buildx build \
--platform linux/arm,linux/arm64,linux/amd64 \
--output "type=image,push=true" \
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag netdaemon/netdaemon_addon5:${{ steps.version.outputs.version }} \
--tag netdaemon/netdaemon_addon5:latest \
--tag ghcr.io/net-daemon/netdaemon_addon5:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon_addon5:latest
deploy_docker:
name: 📦 Deploy to Docker Hub
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: ⏭️ Get next version
id: version
run: |
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
echo Current version: $latest
echo "::set-output name=version::$latest"
- name: 📆 Set version number
run: |
echo setting source version: ${{ steps.version.outputs.version }}
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
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: 🔓 Login to Docker hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: 🔓 Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🛠️ Run Buildx
run: |
docker buildx build \
--platform linux/arm,linux/arm64,linux/amd64 \
--output "type=image,push=true" \
--no-cache \
--file ./Dockerfile . \
--compress \
--tag netdaemon/netdaemon5:latest \
--tag netdaemon/netdaemon5:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon5:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon5:latest