From e2e5b82105bbdc2810fa37b3c1d2065343388a93 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:26:41 -0400 Subject: [PATCH 01/12] adding github actions --- .github/workflows/docker-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..334f915 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,7 @@ +name: docker-build +on: [push] +jobs: + check-bats-version: + runs-on: ubuntu-latest + steps: + - uses: docker build . -t latest \ No newline at end of file From 5d9d3c899b7c25dd39d129a428dcb393e3975958 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:28:28 -0400 Subject: [PATCH 02/12] docker-build --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 334f915..28197e3 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,7 +1,7 @@ name: docker-build on: [push] jobs: - check-bats-version: + build-image: runs-on: ubuntu-latest steps: - - uses: docker build . -t latest \ No newline at end of file + - run: docker build . -t latest \ No newline at end of file From 65c15aed3b4dcdb240cc63e37501cb3b7c952e21 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:30:04 -0400 Subject: [PATCH 03/12] list test --- .github/workflows/docker-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 28197e3..912ed6b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -4,4 +4,5 @@ jobs: build-image: runs-on: ubuntu-latest steps: - - run: docker build . -t latest \ No newline at end of file + - run: docker build . -t latest + - run: ls -al \ No newline at end of file From 398a138d1bfff8c84d39800d2c2b977d7b26ddf5 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:30:48 -0400 Subject: [PATCH 04/12] testing --- .github/workflows/docker-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 912ed6b..0cd1b83 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -4,5 +4,4 @@ jobs: build-image: runs-on: ubuntu-latest steps: - - run: docker build . -t latest - run: ls -al \ No newline at end of file From b3947a9daec878e3161002c8eafba426d75b53b6 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:33:40 -0400 Subject: [PATCH 05/12] docker-build --- .github/workflows/docker-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0cd1b83..45cf955 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -4,4 +4,6 @@ jobs: build-image: runs-on: ubuntu-latest steps: + - name: Check out the repo + uses: actions/checkout@v2 - run: ls -al \ No newline at end of file From 55bf1ede7bb8ef13f569f2603c5539e363c9c156 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:35:06 -0400 Subject: [PATCH 06/12] build --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 45cf955..c718d3b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -6,4 +6,4 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v2 - - run: ls -al \ No newline at end of file + - run: docker build . -t latest \ No newline at end of file From bb5d44444c58679815f3e43ca62f3e7fdc0ccb7b Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:38:25 -0400 Subject: [PATCH 07/12] Build Docker Image --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index c718d3b..48446f3 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -4,6 +4,6 @@ jobs: build-image: runs-on: ubuntu-latest steps: - - name: Check out the repo + - name: Build Docker Image uses: actions/checkout@v2 - run: docker build . -t latest \ No newline at end of file From 7e65d3e954770530d909f043c01794a07d17e452 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:41:41 -0400 Subject: [PATCH 08/12] Test Docker Build --- dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/dockerfile b/dockerfile index 3200a79..3581d5e 100644 --- a/dockerfile +++ b/dockerfile @@ -8,6 +8,7 @@ RUN python3 -m pip install --upgrade pip RUN python3 -m pip install wheel RUN python3 -m pip install pyqt5 RUN python3 -m pip install setuptools +RUN echo "Docker Build Done" # Install Tasmota Device Manager RUN pip3 install tdmgr From ae37ccb6b4ae7d6095fffb0acacea52fadcf410e Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:43:48 -0400 Subject: [PATCH 09/12] Cleanup --- dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/dockerfile b/dockerfile index 3581d5e..3200a79 100644 --- a/dockerfile +++ b/dockerfile @@ -8,7 +8,6 @@ RUN python3 -m pip install --upgrade pip RUN python3 -m pip install wheel RUN python3 -m pip install pyqt5 RUN python3 -m pip install setuptools -RUN echo "Docker Build Done" # Install Tasmota Device Manager RUN pip3 install tdmgr From 37be498f1f13bc133d7da26706b499cc3989dd8e Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Tue, 23 Mar 2021 13:48:02 -0400 Subject: [PATCH 10/12] Trigger on pull requests --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 48446f3..ef95120 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,5 +1,5 @@ name: docker-build -on: [push] +on: [push, pull_request] jobs: build-image: runs-on: ubuntu-latest From 26454fe0e152d505a45c6e7f92690b529dcb66f0 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Wed, 11 Aug 2021 15:08:44 -0400 Subject: [PATCH 11/12] Add release publish --- .github/workflows/docker-publish.yml | 41 ++++++++++++++++++++++++++++ docker-compose-build.yml | 14 ++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/docker-publish.yml create mode 100644 docker-compose-build.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..9bb316c --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,41 @@ +name: Create and publish a Docker image + +on: + release: + types: [published] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/docker-compose-build.yml b/docker-compose-build.yml new file mode 100644 index 0000000..192afc8 --- /dev/null +++ b/docker-compose-build.yml @@ -0,0 +1,14 @@ +version: '3.3' +services: + tasmota-device-manager: + build: . + volumes: + - "/dockervolumes/tasmota-device-manager/config:/config" + - "/etc/localtime:/etc/localtime:ro" + - "/etc/timezone:/etc/timezone:ro" + ports: + - '5810:5800' + - '5910:5900' + container_name: tasmota-device-manager + hostname: tasmota-device-manager + restart: unless-stopped From 676a46c03646e0258d6a35b8f855e4c31ddaa96a Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Wed, 11 Aug 2021 15:20:17 -0400 Subject: [PATCH 12/12] switch to image --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 192afc8..e4d71ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.3' services: tasmota-device-manager: - build: . + image: ghcr.io/sirgoodenough/tdmdock:latest volumes: - "/dockervolumes/tasmota-device-manager/config:/config" - "/etc/localtime:/etc/localtime:ro"