Skip to content

Commit

Permalink
push docker manual with tag
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed May 2, 2021
1 parent c6256f7 commit 5dd7c9e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/push_docker_manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#### Publish tags to docker hub
name: 📦 Deploy dev docker
on:
inputs:
tag:
description: 'Enter docker image tag'
required: true
default: 'warning'

jobs:
deploy:
name: 📦 Deploy to Docker with tag
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- 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 build";' ${{github.workspace}}/src/DaemonRunner/DaemonRunner/Service/RunnerService.cs
sed -i '/ io.hass.version=/c\ io.hass.version="dev" \\' ${{github.workspace}}/Dockerfile
-
name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: 🔓 Login to docker hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_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/netdaemon:feature-${{ github.event.inputs.tag }}"

0 comments on commit 5dd7c9e

Please sign in to comment.