From 5dd7c9ebce776c80ce04388e0d5d7aeed4694c0e Mon Sep 17 00:00:00 2001 From: helto4real Date: Sun, 2 May 2021 14:05:34 +0200 Subject: [PATCH 1/2] push docker manual with tag --- .github/workflows/push_docker_manual.yml | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/push_docker_manual.yml diff --git a/.github/workflows/push_docker_manual.yml b/.github/workflows/push_docker_manual.yml new file mode 100644 index 000000000..4c79b3d87 --- /dev/null +++ b/.github/workflows/push_docker_manual.yml @@ -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 }}" From 9bff0bb1184d6d9e021cf0832b83541468f56402 Mon Sep 17 00:00:00 2001 From: helto4real Date: Sun, 2 May 2021 14:09:37 +0200 Subject: [PATCH 2/2] name change --- .github/workflows/push_docker_manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_docker_manual.yml b/.github/workflows/push_docker_manual.yml index 4c79b3d87..883264d5c 100644 --- a/.github/workflows/push_docker_manual.yml +++ b/.github/workflows/push_docker_manual.yml @@ -1,5 +1,5 @@ #### Publish tags to docker hub -name: 📦 Deploy dev docker +name: 📦 Deploy to Docker with tag on: inputs: tag: