From d7a8b7c3a6501a4ad9f28f083ba6b23d380e4d02 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Wed, 1 Jun 2022 01:57:30 +0200 Subject: [PATCH 01/55] Added github actions file for auto pushing image to my dockerhub docker-dhcp repository --- .github/workflows/docker.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..53cb3d9 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,40 @@ +name: Build Docker images + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-18.04 + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup QEMU + id: qemu + uses: docker/setup-qemu-action@v1.0.1 + with: + platforms: linux/amd64,linux/arm/v6,linux/arm64 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1.0.4 + + - name: Login to Docker Hub + uses: docker/login-action@v1.8.0 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm/v6,linux/arm64 + push: true + tags: wickywaka/docker-dhcp:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} From 2d348f93480d8abfa3ee9181209b792f39c0365e Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Wed, 1 Jun 2022 02:00:20 +0200 Subject: [PATCH 02/55] Fixed master branch name in github actions file --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 53cb3d9..ea5d2bf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: Build Docker images on: push: - branches: [ main ] + branches: [ master ] workflow_dispatch: jobs: From ede437b7b8f3c5d7c6a8c77a34859eb3a1bcfe1d Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Wed, 1 Jun 2022 02:07:15 +0200 Subject: [PATCH 03/55] trying to fix error in github actions run --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ea5d2bf..e57c1dd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,7 +16,7 @@ jobs: id: qemu uses: docker/setup-qemu-action@v1.0.1 with: - platforms: linux/amd64,linux/arm/v6,linux/arm64 + platforms: linux/amd64,linux/arm/v6 - name: Set up Docker Buildx id: buildx @@ -32,7 +32,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - platforms: linux/amd64,linux/arm/v6,linux/arm64 + platforms: linux/amd64,linux/arm/v6 push: true tags: wickywaka/docker-dhcp:latest From 28877223b6afe10cae374ffe2c35d52280934a12 Mon Sep 17 00:00:00 2001 From: waqar rashid Date: Wed, 1 Jun 2022 10:36:35 +0200 Subject: [PATCH 04/55] Update docker.yml updated --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e57c1dd..b486ed8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,7 +16,7 @@ jobs: id: qemu uses: docker/setup-qemu-action@v1.0.1 with: - platforms: linux/amd64,linux/arm/v6 + platforms: linux/amd64,linux/arm/v7,linux/arm64 - name: Set up Docker Buildx id: buildx @@ -32,7 +32,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - platforms: linux/amd64,linux/arm/v6 + platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true tags: wickywaka/docker-dhcp:latest From 89b55ec064fb10dad1f6f62918c3bdd67a31f070 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Wed, 1 Jun 2022 10:56:32 +0200 Subject: [PATCH 05/55] updated docker hub push repository to networkboot/dhcpd --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b486ed8..3bb0a53 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -34,7 +34,7 @@ jobs: with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true - tags: wickywaka/docker-dhcp:latest + tags: networkboot/dhcpd:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 2b2b9ec85a3f923884c7748584cffcfcd8aece19 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Wed, 1 Jun 2022 11:23:30 +0200 Subject: [PATCH 06/55] fixed repo link --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e57c1dd..669f193 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -34,7 +34,7 @@ jobs: with: platforms: linux/amd64,linux/arm/v6 push: true - tags: wickywaka/docker-dhcp:latest + tags: wickywaka/docker-dhcpd:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 52defc09cc2024b973b3718b6efc130c98deb2a1 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:30:39 +0200 Subject: [PATCH 07/55] Add new test file to understand how github actions work --- .github/workflows/dockerize-tag.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/dockerize-tag.yml diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml new file mode 100644 index 0000000..51b2330 --- /dev/null +++ b/.github/workflows/dockerize-tag.yml @@ -0,0 +1,17 @@ +name: GitHub Actions Demo +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file From 681f2274f659a7630e7700ce8103004d51669142 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:51:05 +0200 Subject: [PATCH 08/55] Added workflow for tag. won't execute for this commit --- .github/workflows/docker.yml | 4 ++-- .github/workflows/dockerize-tag.yml | 18 +++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3bb0a53..4a97fb5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: Build Docker images +name: Build and Push latest Docker for each commit on: push: @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v2 diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 51b2330..f6c7663 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,17 +1,13 @@ -name: GitHub Actions Demo -on: [push] +name: Build and Push version tagged Docker for each tag +on: push + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: + - uses: olegtarasov/get-tag@v2.1 + id: tagName - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} + - run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file From f02d54b7b8a487430cb5a769c90dc8ad68e583fd Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 14:01:48 +0200 Subject: [PATCH 09/55] tag action will run --- .github/workflows/dockerize-tag.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index f6c7663..93242cc 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,7 +1,8 @@ name: Build and Push version tagged Docker for each tag on: push - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + #branches: [ master ] + #tags: + # - 'v[0-9]+.[0-9]+.[0-9]+' jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -9,5 +10,5 @@ jobs: - uses: olegtarasov/get-tag@v2.1 id: tagName - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." + #- run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file From a8eb1d2467c2c60d09b34e7a072f829c03f44f77 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 14:02:44 +0200 Subject: [PATCH 10/55] updated name --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 93242cc..2ee305a 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -4,7 +4,7 @@ on: push #tags: # - 'v[0-9]+.[0-9]+.[0-9]+' jobs: - Explore-GitHub-Actions: + Build-Push-Tag: runs-on: ubuntu-latest steps: - uses: olegtarasov/get-tag@v2.1 From f0411a8d47b18c5503dc1e3a7cbbe229f9026432 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 14:03:28 +0200 Subject: [PATCH 11/55] Will not run because commit is not tagged --- .github/workflows/dockerize-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 2ee305a..e2cd863 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,8 +1,8 @@ name: Build and Push version tagged Docker for each tag on: push #branches: [ master ] - #tags: - # - 'v[0-9]+.[0-9]+.[0-9]+' + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: Build-Push-Tag: runs-on: ubuntu-latest From ae86ceb2eae3d611ff15b1da5d0dcb2ddbd0aa98 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:32:03 +0000 Subject: [PATCH 12/55] udapted --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index e2cd863..8a539af 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,6 +1,6 @@ name: Build and Push version tagged Docker for each tag on: push - #branches: [ master ] + branches: [ master, pull-request ] tags: - 'v[0-9]+.[0-9]+.[0-9]+' jobs: From 3510ddf7a0d32fe477c1bb1fa9142f3feab86c1e Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:34:07 +0000 Subject: [PATCH 13/55] udpated --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 8a539af..f890e5c 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -2,7 +2,7 @@ name: Build and Push version tagged Docker for each tag on: push branches: [ master, pull-request ] tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: Build-Push-Tag: runs-on: ubuntu-latest From 11a05d23e85693c896a5ae4353f9055d5e7cb233 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:36:33 +0000 Subject: [PATCH 14/55] udpated --- .github/workflows/dockerize-tag.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index f890e5c..dd7e607 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,8 +1,9 @@ name: Build and Push version tagged Docker for each tag -on: push - branches: [ master, pull-request ] - tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' +on: + push: + # branches: [ master, pull-request ] + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: Build-Push-Tag: runs-on: ubuntu-latest From cc779cf54597caba2af27ed025aff5b7da147ad5 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:37:37 +0000 Subject: [PATCH 15/55] udated --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index dd7e607..238415d 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -11,5 +11,5 @@ jobs: - uses: olegtarasov/get-tag@v2.1 id: tagName - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - #- run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." + - run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file From 7f9eaf9b09e34121495e5df2f1c6e57fef5e6a2a Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:44:46 +0000 Subject: [PATCH 16/55] created workflows for latest and tag --- .../{docker.yml => dockerize-latest.yml} | 2 +- .github/workflows/dockerize-tag.yml | 33 +++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) rename .github/workflows/{docker.yml => dockerize-latest.yml} (97%) diff --git a/.github/workflows/docker.yml b/.github/workflows/dockerize-latest.yml similarity index 97% rename from .github/workflows/docker.yml rename to .github/workflows/dockerize-latest.yml index e15f9de..49e71bd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/dockerize-latest.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: - build: + build-Push-Latest: runs-on: ubuntu-latest steps: - name: Checkout Repository diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 238415d..0fa0b00 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,7 +1,7 @@ name: Build and Push version tagged Docker for each tag on: push: - # branches: [ master, pull-request ] + branches: [ master, pull-request ] tags: - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: @@ -10,6 +10,33 @@ jobs: steps: - uses: olegtarasov/get-tag@v2.1 id: tagName - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup QEMU + id: qemu + uses: docker/setup-qemu-action@v1.0.1 + with: + platforms: linux/amd64,linux/arm/v7,linux/arm64 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1.0.4 + + - name: Login to Docker Hub + uses: docker/login-action@v1.8.0 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: true + tags: wickywaka/docker-dhcpd:${{ steps.tagName.outputs.tag }} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} From cc1f41ff8b11ec6c9240235ecb6ee10570598e8e Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:46:13 +0000 Subject: [PATCH 17/55] udpated latest tag to protect existing latest tag --- .github/workflows/dockerize-latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index 49e71bd..45f4f88 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -2,7 +2,7 @@ name: Build and Push latest Docker for each commit on: push: - branches: [ master ] + branches: [ master, pull-request ] workflow_dispatch: jobs: @@ -34,7 +34,7 @@ jobs: with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true - tags: wickywaka/docker-dhcpd:latest + tags: wickywaka/docker-dhcpd:la-test - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From f8fe3297f5898853c58fd2258f086657a396c203 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:03:56 +0000 Subject: [PATCH 18/55] updated --- .github/workflows/dockerize-latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index 45f4f88..49e71bd 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -2,7 +2,7 @@ name: Build and Push latest Docker for each commit on: push: - branches: [ master, pull-request ] + branches: [ master ] workflow_dispatch: jobs: @@ -34,7 +34,7 @@ jobs: with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true - tags: wickywaka/docker-dhcpd:la-test + tags: wickywaka/docker-dhcpd:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 34c231e7ea493eb5bb7dd813e7ab60a001691bdf Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:05:14 +0000 Subject: [PATCH 19/55] udated --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 0fa0b00..693862d 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,7 +1,7 @@ name: Build and Push version tagged Docker for each tag on: push: - branches: [ master, pull-request ] + branches: [ master ] tags: - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: From a55b4752cd6458a08dfd9f576242fa8c22058eec Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:15:18 +0000 Subject: [PATCH 20/55] updated names --- .github/workflows/dockerize-latest.yml | 2 +- .github/workflows/dockerize-tag.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index 49e71bd..a665dbd 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -1,4 +1,4 @@ -name: Build and Push latest Docker for each commit +name: Build and Push latest on: push: diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 693862d..cfd57ee 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,7 +1,8 @@ -name: Build and Push version tagged Docker for each tag +name: Build and Push Tag on: push: - branches: [ master ] + branches: + - 'master' tags: - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: From 89140a8a7cc43a974a032e6f3012bb0994a0a86a Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:17:30 +0000 Subject: [PATCH 21/55] removed extra line --- .github/workflows/dockerize-tag.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index cfd57ee..cb5d177 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -1,8 +1,6 @@ name: Build and Push Tag on: push: - branches: - - 'master' tags: - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: @@ -11,7 +9,7 @@ jobs: steps: - uses: olegtarasov/get-tag@v2.1 id: tagName - - run: echo "🎉 Tag is ${{ steps.tagName.outputs.tag }}." + - name: Checkout Repository uses: actions/checkout@v2 From 0882d6f5f5e210883fcf9c242ccbc52438752ff0 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Mon, 25 Jul 2022 16:02:00 +0200 Subject: [PATCH 22/55] Improved consisteny, updated dockerhub repo name --- .github/workflows/dockerize-latest.yml | 4 ++-- .github/workflows/dockerize-tag.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index a665dbd..9cf1700 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: - build-Push-Latest: + build-push-latest: runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -34,7 +34,7 @@ jobs: with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true - tags: wickywaka/docker-dhcpd:latest + tags: networkboot/dhcpd:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index cb5d177..5e1bb70 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: olegtarasov/get-tag@v2.1 - id: tagName + id: get-tag - name: Checkout Repository uses: actions/checkout@v2 @@ -35,7 +35,7 @@ jobs: with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true - tags: wickywaka/docker-dhcpd:${{ steps.tagName.outputs.tag }} + tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From f8f54ef9bad2d04a30b94dd0643ed821904b0707 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Mon, 25 Jul 2022 16:13:14 +0200 Subject: [PATCH 23/55] cleanup --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 5e1bb70..b99400e 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -4,7 +4,7 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: - Build-Push-Tag: + build-push-tag: runs-on: ubuntu-latest steps: - uses: olegtarasov/get-tag@v2.1 From 10209ba178923a2078ce6a565fa2f75e6ff55286 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Mon, 25 Jul 2022 16:48:46 +0200 Subject: [PATCH 24/55] Added new action for semver parsing --- .github/workflows/dockerize-tag.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index b99400e..85847eb 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -6,9 +6,26 @@ on: jobs: build-push-tag: runs-on: ubuntu-latest + steps: + - name: Parse semver string + id: semver_parser + uses: booxmedialtd/ws-action-parse-semver@v1 + with: + input_string: 'refs/tags/v1.0.4' + version_extractor_regex: '\/v(.*)$' + - name: Use parsed semver + run: | + echo "v${{ steps.semver_parser.outputs.major }}" + echo "v${{ steps.semver_parser.outputs.minor }}" + echo "v${{ steps.semver_parser.outputs.patch }}" + echo "v${{ steps.semver_parser.outputs.prerelease }}" + echo "v${{ steps.semver_parser.outputs.build }}" + echo "v${{ steps.semver_parser.outputs.fullversion }}" steps: - uses: olegtarasov/get-tag@v2.1 id: get-tag + with: + tagRegex: "v(.*)" - name: Checkout Repository uses: actions/checkout@v2 From 89edae77622bdfc6ae762f5cfb96c14200085820 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Mon, 25 Jul 2022 16:56:29 +0200 Subject: [PATCH 25/55] Removed unecessary echo print statement --- .github/workflows/dockerize-tag.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 85847eb..b6abfb8 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -15,11 +15,6 @@ jobs: version_extractor_regex: '\/v(.*)$' - name: Use parsed semver run: | - echo "v${{ steps.semver_parser.outputs.major }}" - echo "v${{ steps.semver_parser.outputs.minor }}" - echo "v${{ steps.semver_parser.outputs.patch }}" - echo "v${{ steps.semver_parser.outputs.prerelease }}" - echo "v${{ steps.semver_parser.outputs.build }}" echo "v${{ steps.semver_parser.outputs.fullversion }}" steps: - uses: olegtarasov/get-tag@v2.1 From 32a220943ea271e874fc88b52f201468a79d3625 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Mon, 25 Jul 2022 16:57:44 +0200 Subject: [PATCH 26/55] Fixed yml syntax --- .github/workflows/dockerize-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index b6abfb8..6bfe74f 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -7,7 +7,7 @@ jobs: build-push-tag: runs-on: ubuntu-latest steps: - - name: Parse semver string + - name: Parse semver string id: semver_parser uses: booxmedialtd/ws-action-parse-semver@v1 with: @@ -16,7 +16,7 @@ jobs: - name: Use parsed semver run: | echo "v${{ steps.semver_parser.outputs.fullversion }}" - steps: + - uses: olegtarasov/get-tag@v2.1 id: get-tag with: From 421bb39a7483f3d08ecc8b629d59bb1144eebf52 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Mon, 25 Jul 2022 17:03:04 +0200 Subject: [PATCH 27/55] updated with space --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 6bfe74f..978d4b3 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -7,7 +7,7 @@ jobs: build-push-tag: runs-on: ubuntu-latest steps: - - name: Parse semver string + - name: Parse semver string id: semver_parser uses: booxmedialtd/ws-action-parse-semver@v1 with: From 5251b3a0710e3ab9a0aab5dff9b516c3194ee33f Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Tue, 26 Jul 2022 08:09:49 +0000 Subject: [PATCH 28/55] Fixed usage of parse-semver --- .github/workflows/dockerize-tag.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 978d4b3..d89b5d6 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -7,21 +7,21 @@ jobs: build-push-tag: runs-on: ubuntu-latest steps: + - uses: olegtarasov/get-tag@v2.1 + id: get-tag + with: + tagRegex: "v(.*)" + - name: Parse semver string id: semver_parser uses: booxmedialtd/ws-action-parse-semver@v1 with: - input_string: 'refs/tags/v1.0.4' + input_string: $GIT_TAG_NAME version_extractor_regex: '\/v(.*)$' - name: Use parsed semver run: | echo "v${{ steps.semver_parser.outputs.fullversion }}" - - uses: olegtarasov/get-tag@v2.1 - id: get-tag - with: - tagRegex: "v(.*)" - - name: Checkout Repository uses: actions/checkout@v2 From a64debf51a5623772e8b9e2a286ab08733f57847 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 10:48:48 +0200 Subject: [PATCH 29/55] debugging --- .github/workflows/dockerize-tag.yml | 66 ++++++++++++++--------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index d89b5d6..ecd3f3e 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -12,42 +12,42 @@ jobs: with: tagRegex: "v(.*)" - - name: Parse semver string - id: semver_parser - uses: booxmedialtd/ws-action-parse-semver@v1 - with: - input_string: $GIT_TAG_NAME - version_extractor_regex: '\/v(.*)$' - - name: Use parsed semver - run: | - echo "v${{ steps.semver_parser.outputs.fullversion }}" + # - name: Parse semver string + # id: semver_parser + # uses: booxmedialtd/ws-action-parse-semver@v1 + # with: + # input_string: $GIT_TAG_NAME + # version_extractor_regex: '\/v(.*)$' + # - name: Use parsed semver + # run: | + # echo "v${{ steps.semver_parser.outputs.fullversion }}" - - name: Checkout Repository - uses: actions/checkout@v2 + # - name: Checkout Repository + # uses: actions/checkout@v2 - - name: Setup QEMU - id: qemu - uses: docker/setup-qemu-action@v1.0.1 - with: - platforms: linux/amd64,linux/arm/v7,linux/arm64 + # - name: Setup QEMU + # id: qemu + # uses: docker/setup-qemu-action@v1.0.1 + # with: + # platforms: linux/amd64,linux/arm/v7,linux/arm64 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1.0.4 + # - name: Set up Docker Buildx + # id: buildx + # uses: docker/setup-buildx-action@v1.0.4 - - name: Login to Docker Hub - uses: docker/login-action@v1.8.0 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} + # - name: Login to Docker Hub + # uses: docker/login-action@v1.8.0 + # with: + # username: ${{ secrets.DOCKER_HUB_USERNAME }} + # password: ${{ secrets.DOCKER_HUB_TOKEN }} - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: true - tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }} + # - name: Build and push + # id: docker_build + # uses: docker/build-push-action@v2 + # with: + # platforms: linux/amd64,linux/arm/v7,linux/arm64 + # push: true + # tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }} - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} + # - name: Image digest + # run: echo ${{ steps.docker_build.outputs.digest }} From 96c9e3e9651981f435a58f1182319a35a5a80286 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 10:51:40 +0200 Subject: [PATCH 30/55] debugging: uncommented semver-parser --- .github/workflows/dockerize-tag.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index ecd3f3e..f09e859 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -12,15 +12,15 @@ jobs: with: tagRegex: "v(.*)" - # - name: Parse semver string - # id: semver_parser - # uses: booxmedialtd/ws-action-parse-semver@v1 - # with: - # input_string: $GIT_TAG_NAME - # version_extractor_regex: '\/v(.*)$' - # - name: Use parsed semver - # run: | - # echo "v${{ steps.semver_parser.outputs.fullversion }}" + - name: Parse semver string + id: semver_parser + uses: booxmedialtd/ws-action-parse-semver@v1 + with: + input_string: $GIT_TAG_NAME + version_extractor_regex: '\/v(.*)$' + - name: Use parsed semver + run: | + echo "v${{ steps.semver_parser.outputs.fullversion }}" # - name: Checkout Repository # uses: actions/checkout@v2 From 194d3c32b775c50e1211fccd22ed23d5e6e50893 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 10:56:11 +0200 Subject: [PATCH 31/55] next try to find the bug --- .github/workflows/dockerize-tag.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index f09e859..d832e04 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -13,14 +13,14 @@ jobs: tagRegex: "v(.*)" - name: Parse semver string - id: semver_parser + id: semver-parser uses: booxmedialtd/ws-action-parse-semver@v1 with: - input_string: $GIT_TAG_NAME + input_string: 'refs/tags/v1.0.4' version_extractor_regex: '\/v(.*)$' - - name: Use parsed semver - run: | - echo "v${{ steps.semver_parser.outputs.fullversion }}" + # - name: Use parsed semver + # run: | + # echo "v${{ steps.semver-parser.outputs.fullversion }}" # - name: Checkout Repository # uses: actions/checkout@v2 From c58a7fe8c1ec46a4446358cafb7afecce6897c33 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 10:59:15 +0200 Subject: [PATCH 32/55] next attemp --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index d832e04..e38989c 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -14,7 +14,7 @@ jobs: - name: Parse semver string id: semver-parser - uses: booxmedialtd/ws-action-parse-semver@v1 + uses: booxmedialtd/parse-semver@v1 with: input_string: 'refs/tags/v1.0.4' version_extractor_regex: '\/v(.*)$' From 7828c650c62292c49468d989b333a02868fa92ee Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:09:41 +0200 Subject: [PATCH 33/55] Added semver test file --- .github/workflows/semver.yml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/semver.yml diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml new file mode 100644 index 0000000..6e0ca73 --- /dev/null +++ b/.github/workflows/semver.yml @@ -0,0 +1,56 @@ +name: Build and Push Tag +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' +jobs: + build-push-tag: + runs-on: ubuntu-latest + steps: + - uses: olegtarasov/get-tag@v2.1 + id: get-tag + with: + tagRegex: "v(.*)" + + - name: print get-tag result + run: echo $GIT_TAG_NAME + + # - name: Parse semver string + # id: semver-parser + # uses: booxmedialtd/parse-semver@v1 + # with: + # input_string: 'refs/tags/v1.0.4' + # version_extractor_regex: '\/v(.*)$' + + # - name: Use parsed semver + # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" + + # - name: Checkout Repository + # uses: actions/checkout@v2 + + # - name: Setup QEMU + # id: qemu + # uses: docker/setup-qemu-action@v1.0.1 + # with: + # platforms: linux/amd64,linux/arm/v7,linux/arm64 + + # - name: Set up Docker Buildx + # id: buildx + # uses: docker/setup-buildx-action@v1.0.4 + + # - name: Login to Docker Hub + # uses: docker/login-action@v1.8.0 + # with: + # username: ${{ secrets.DOCKER_HUB_USERNAME }} + # password: ${{ secrets.DOCKER_HUB_TOKEN }} + + # - name: Build and push + # id: docker_build + # uses: docker/build-push-action@v2 + # with: + # platforms: linux/amd64,linux/arm/v7,linux/arm64 + # push: true + # tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }} + + # - name: Image digest + # run: echo ${{ steps.docker_build.outputs.digest }} From 86b2d370c1daf9036d3c5db34418fb987d5c6663 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:13:56 +0200 Subject: [PATCH 34/55] updated --- .github/workflows/semver.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 6e0ca73..65d1ba1 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -1,4 +1,4 @@ -name: Build and Push Tag +name: Semver Test Workflow on: push: tags: @@ -14,6 +14,7 @@ jobs: - name: print get-tag result run: echo $GIT_TAG_NAME + run: echo $steps.get-tag.outputs.tag # - name: Parse semver string # id: semver-parser From 3d553478d0d58c49a9b25845dff3aac6a18b375b Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:15:32 +0200 Subject: [PATCH 35/55] updated --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 65d1ba1..35099c8 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -14,7 +14,7 @@ jobs: - name: print get-tag result run: echo $GIT_TAG_NAME - run: echo $steps.get-tag.outputs.tag + run: echo ${{ steps.get-tag.outputs.tag }} # - name: Parse semver string # id: semver-parser From 1e172e607af54c6ab3baf63d383dc56b7744e28a Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:19:40 +0200 Subject: [PATCH 36/55] updated --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 35099c8..efa95ff 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -14,7 +14,7 @@ jobs: - name: print get-tag result run: echo $GIT_TAG_NAME - run: echo ${{ steps.get-tag.outputs.tag }} + run: echo "${{ steps.get-tag.outputs.tag }}" # - name: Parse semver string # id: semver-parser From 66977574c13386abc328c4de540b68bcde08c88b Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:24:12 +0200 Subject: [PATCH 37/55] updated --- .github/workflows/semver.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index efa95ff..a7a1a2f 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -12,9 +12,8 @@ jobs: with: tagRegex: "v(.*)" - - name: print get-tag result - run: echo $GIT_TAG_NAME - run: echo "${{ steps.get-tag.outputs.tag }}" + - run: echo $GIT_TAG_NAME + - run: echo "${{ steps.get-tag.outputs.tag }}" # - name: Parse semver string # id: semver-parser From c32f30a9ddb5297e468cf23fb6612316d5032fea Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:32:10 +0200 Subject: [PATCH 38/55] updated --- .github/workflows/semver.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index a7a1a2f..154c415 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -15,12 +15,12 @@ jobs: - run: echo $GIT_TAG_NAME - run: echo "${{ steps.get-tag.outputs.tag }}" - # - name: Parse semver string - # id: semver-parser - # uses: booxmedialtd/parse-semver@v1 - # with: - # input_string: 'refs/tags/v1.0.4' - # version_extractor_regex: '\/v(.*)$' + - name: Parse semver string + id: semver-parser + uses: booxmedialtd/parse-semver@v1 + with: + input_string: 'refs/tags/v1.0.4' + version_extractor_regex: '\/v(.*)$' # - name: Use parsed semver # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" From 9a9126b52b0e5fc9e77f52aca3e147095ab5da7d Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:37:01 +0200 Subject: [PATCH 39/55] updated --- .github/workflows/semver.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 154c415..69044cc 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -15,10 +15,10 @@ jobs: - run: echo $GIT_TAG_NAME - run: echo "${{ steps.get-tag.outputs.tag }}" - - name: Parse semver string - id: semver-parser - uses: booxmedialtd/parse-semver@v1 - with: + - name: Parse semver string + id: semver-parser + uses: booxmedialtd/ws-action-parse-semver@v1 + with: input_string: 'refs/tags/v1.0.4' version_extractor_regex: '\/v(.*)$' From 3179be150b2ab82d13858fad09f8510849247f70 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:38:24 +0200 Subject: [PATCH 40/55] updated --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 69044cc..a394104 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -19,7 +19,7 @@ jobs: id: semver-parser uses: booxmedialtd/ws-action-parse-semver@v1 with: - input_string: 'refs/tags/v1.0.4' + input_string: $GIT_TAG_NAME version_extractor_regex: '\/v(.*)$' # - name: Use parsed semver From 1d3510cce4cacfdad09dcbbd4ab9f459cdf9a88d Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:39:47 +0200 Subject: [PATCH 41/55] updated --- .github/workflows/semver.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index a394104..25ebbd0 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -20,7 +20,6 @@ jobs: uses: booxmedialtd/ws-action-parse-semver@v1 with: input_string: $GIT_TAG_NAME - version_extractor_regex: '\/v(.*)$' # - name: Use parsed semver # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" From 185995bed460b195f5d63a9577e73174dd6f0758 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:42:36 +0200 Subject: [PATCH 42/55] updated --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 25ebbd0..5a589db 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -19,7 +19,7 @@ jobs: id: semver-parser uses: booxmedialtd/ws-action-parse-semver@v1 with: - input_string: $GIT_TAG_NAME + input_string: "${{ steps.get-tag.outputs.tag }}" # - name: Use parsed semver # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" From 3e6bf8efbb82e59ee39118428b49b0a222fef860 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:45:34 +0200 Subject: [PATCH 43/55] updated --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 5a589db..36eb873 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -19,7 +19,7 @@ jobs: id: semver-parser uses: booxmedialtd/ws-action-parse-semver@v1 with: - input_string: "${{ steps.get-tag.outputs.tag }}" + input_string: "$GIT_TAG_NAME" # - name: Use parsed semver # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" From 5ab470f1d731ecf2c1f6e8bd4fae78bcb97275e9 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:46:57 +0200 Subject: [PATCH 44/55] updated --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 36eb873..5a589db 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -19,7 +19,7 @@ jobs: id: semver-parser uses: booxmedialtd/ws-action-parse-semver@v1 with: - input_string: "$GIT_TAG_NAME" + input_string: "${{ steps.get-tag.outputs.tag }}" # - name: Use parsed semver # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" From db91786dc85b9dd074be14a7fdf883c6e34f1acb Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:48:54 +0200 Subject: [PATCH 45/55] updated --- .github/workflows/dockerize-tag.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index e38989c..e3cebc5 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -12,12 +12,12 @@ jobs: with: tagRegex: "v(.*)" - - name: Parse semver string - id: semver-parser - uses: booxmedialtd/parse-semver@v1 - with: - input_string: 'refs/tags/v1.0.4' - version_extractor_regex: '\/v(.*)$' + - name: Parse semver string + id: semver-parser + uses: booxmedialtd/parse-semver@v1 + with: + input_string: "${{ steps.get-tag.outputs.tag }}" + # - name: Use parsed semver # run: | # echo "v${{ steps.semver-parser.outputs.fullversion }}" From 9946e1fb2c5515fdbfcfb4d6647c561e226a94e8 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:50:25 +0200 Subject: [PATCH 46/55] updated --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index e3cebc5..fb67808 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -14,7 +14,7 @@ jobs: - name: Parse semver string id: semver-parser - uses: booxmedialtd/parse-semver@v1 + uses: booxmedialtd/ws-action-parse-semver@v1 with: input_string: "${{ steps.get-tag.outputs.tag }}" From edd89b2df088d8e630118595915f2f1e7c8154d6 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 11:53:22 +0200 Subject: [PATCH 47/55] udpated --- .github/workflows/dockerize-tag.yml | 66 ++++++++++++++--------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index fb67808..af62526 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -18,36 +18,36 @@ jobs: with: input_string: "${{ steps.get-tag.outputs.tag }}" - # - name: Use parsed semver - # run: | - # echo "v${{ steps.semver-parser.outputs.fullversion }}" - - # - name: Checkout Repository - # uses: actions/checkout@v2 - - # - name: Setup QEMU - # id: qemu - # uses: docker/setup-qemu-action@v1.0.1 - # with: - # platforms: linux/amd64,linux/arm/v7,linux/arm64 - - # - name: Set up Docker Buildx - # id: buildx - # uses: docker/setup-buildx-action@v1.0.4 - - # - name: Login to Docker Hub - # uses: docker/login-action@v1.8.0 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_TOKEN }} - - # - name: Build and push - # id: docker_build - # uses: docker/build-push-action@v2 - # with: - # platforms: linux/amd64,linux/arm/v7,linux/arm64 - # push: true - # tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }} - - # - name: Image digest - # run: echo ${{ steps.docker_build.outputs.digest }} + - name: Use parsed semver + run: | + echo "v${{ steps.semver-parser.outputs.fullversion }}" + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup QEMU + id: qemu + uses: docker/setup-qemu-action@v1.0.1 + with: + platforms: linux/amd64,linux/arm/v7,linux/arm64 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1.0.4 + + - name: Login to Docker Hub + uses: docker/login-action@v1.8.0 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: true + tags: networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} From 35aa3199f10cf9a013ef9278fc7dc1b1055abb25 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 12:42:55 +0200 Subject: [PATCH 48/55] seems to be working now --- .github/workflows/dockerize-latest.yml | 4 +- .github/workflows/dockerize-tag.yml | 8 +--- .github/workflows/semver.yml | 55 -------------------------- 3 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/semver.yml diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index 9cf1700..ee16a0d 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -28,7 +28,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - - name: Build and push + - name: Build and Push id: docker_build uses: docker/build-push-action@v2 with: @@ -36,5 +36,5 @@ jobs: push: true tags: networkboot/dhcpd:latest - - name: Image digest + - name: Print Image Digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index af62526..1aaa70b 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -12,16 +12,12 @@ jobs: with: tagRegex: "v(.*)" - - name: Parse semver string + - name: Parse Semver String id: semver-parser uses: booxmedialtd/ws-action-parse-semver@v1 with: input_string: "${{ steps.get-tag.outputs.tag }}" - - name: Use parsed semver - run: | - echo "v${{ steps.semver-parser.outputs.fullversion }}" - - name: Checkout Repository uses: actions/checkout@v2 @@ -49,5 +45,5 @@ jobs: push: true tags: networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }} - - name: Image digest + - name: Print Image Digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml deleted file mode 100644 index 5a589db..0000000 --- a/.github/workflows/semver.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Semver Test Workflow -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' -jobs: - build-push-tag: - runs-on: ubuntu-latest - steps: - - uses: olegtarasov/get-tag@v2.1 - id: get-tag - with: - tagRegex: "v(.*)" - - - run: echo $GIT_TAG_NAME - - run: echo "${{ steps.get-tag.outputs.tag }}" - - - name: Parse semver string - id: semver-parser - uses: booxmedialtd/ws-action-parse-semver@v1 - with: - input_string: "${{ steps.get-tag.outputs.tag }}" - - # - name: Use parsed semver - # run: echo "v${{ steps.semver-parser.outputs.fullversion }}" - - # - name: Checkout Repository - # uses: actions/checkout@v2 - - # - name: Setup QEMU - # id: qemu - # uses: docker/setup-qemu-action@v1.0.1 - # with: - # platforms: linux/amd64,linux/arm/v7,linux/arm64 - - # - name: Set up Docker Buildx - # id: buildx - # uses: docker/setup-buildx-action@v1.0.4 - - # - name: Login to Docker Hub - # uses: docker/login-action@v1.8.0 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_TOKEN }} - - # - name: Build and push - # id: docker_build - # uses: docker/build-push-action@v2 - # with: - # platforms: linux/amd64,linux/arm/v7,linux/arm64 - # push: true - # tags: networkboot/dhcpd:${{ steps.get-tag.outputs.tag }} - - # - name: Image digest - # run: echo ${{ steps.docker_build.outputs.digest }} From ac943251e19f5c33bc2080379814d923d4d1c6a3 Mon Sep 17 00:00:00 2001 From: Waqar Rashid Date: Tue, 26 Jul 2022 12:45:56 +0200 Subject: [PATCH 49/55] fixed cap --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 1aaa70b..86be56e 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -37,7 +37,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - - name: Build and push + - name: Build and Push id: docker_build uses: docker/build-push-action@v2 with: From e5e1b883ca5754426e2c5dba6cf42c80f1d83c3a Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Wed, 27 Jul 2022 23:42:56 +0200 Subject: [PATCH 50/55] Added ldap build and push stage --- .github/workflows/dockerize-latest.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index ee16a0d..36f4644 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -2,7 +2,7 @@ name: Build and Push latest on: push: - branches: [ master ] + branches: [ pull-request ] workflow_dispatch: jobs: @@ -28,6 +28,15 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} + - name: Build and Push ldap + id: docker_build + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: true + file: Dockerfile.ldap + tags: wickywaka/docker-dhcpd:ldap-latest + - name: Build and Push id: docker_build uses: docker/build-push-action@v2 From c391434b028ca5394c0b1b804a4d71dff4184c82 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Wed, 27 Jul 2022 23:46:15 +0200 Subject: [PATCH 51/55] Update dockerize-latest.yml --- .github/workflows/dockerize-latest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index 36f4644..00aa6dc 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -29,7 +29,7 @@ jobs: password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Build and Push ldap - id: docker_build + id: docker_build_ldap uses: docker/build-push-action@v2 with: platforms: linux/amd64,linux/arm/v7,linux/arm64 @@ -47,3 +47,6 @@ jobs: - name: Print Image Digest run: echo ${{ steps.docker_build.outputs.digest }} + + - name: Print LDAP Image Digest + run: echo ${{ steps.docker_build_ldap.outputs.digest }} From cc25713fa9bc3fd5fae5189fad7f95eba09f66b5 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Thu, 28 Jul 2022 00:30:38 +0200 Subject: [PATCH 52/55] Update dockerize-tag.yml --- .github/workflows/dockerize-tag.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 86be56e..a4a96ff 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -37,13 +37,30 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Build and Push ldap + id: docker_build_ldap + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: true + file: Dockerfile.ldap + tags: + wickywaka/docker-dhcpd:ladp-${{ steps.semver-parser.outputs.fullversion }}, + wickywaka/docker-dhcpd:ldap-${{ steps.semver-parser.outputs.major }} + + - name: Print LDAP Image Digest + run: echo ${{ steps.docker_build_ldap.outputs.digest }} + - name: Build and Push id: docker_build uses: docker/build-push-action@v2 with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true - tags: networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }} + tags: + networkboot/dhcpd:${{ steps.semver-parser.outputs.fullversion }}, + networkboot/dhcpd:${{ steps.semver-parser.outputs.major }} - name: Print Image Digest run: echo ${{ steps.docker_build.outputs.digest }} From 91b0536ad4709869c3f4acc5b97249d596d4ea6c Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:57:48 +0200 Subject: [PATCH 53/55] Update dockerize-latest.yml --- .github/workflows/dockerize-latest.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dockerize-latest.yml b/.github/workflows/dockerize-latest.yml index 00aa6dc..1522628 100644 --- a/.github/workflows/dockerize-latest.yml +++ b/.github/workflows/dockerize-latest.yml @@ -2,7 +2,7 @@ name: Build and Push latest on: push: - branches: [ pull-request ] + branches: [ master ] workflow_dispatch: jobs: @@ -28,16 +28,20 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - - name: Build and Push ldap + - name: Build and Push Dockerfile.ldap id: docker_build_ldap uses: docker/build-push-action@v2 with: platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true file: Dockerfile.ldap - tags: wickywaka/docker-dhcpd:ldap-latest + tags: networkboot/dhcpd:ldap-latest - - name: Build and Push + + - name: Print LDAP Image Digest + run: echo ${{ steps.docker_build_ldap.outputs.digest }} + + - name: Build and Push Dockerfile id: docker_build uses: docker/build-push-action@v2 with: @@ -45,8 +49,6 @@ jobs: push: true tags: networkboot/dhcpd:latest + - name: Print Image Digest run: echo ${{ steps.docker_build.outputs.digest }} - - - name: Print LDAP Image Digest - run: echo ${{ steps.docker_build_ldap.outputs.digest }} From 73a8e1a3ec35600a2dc4782b470f360f97f6b323 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Thu, 28 Jul 2022 14:09:44 +0200 Subject: [PATCH 54/55] Update dockerize-tag.yml --- .github/workflows/dockerize-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index a4a96ff..2b629ac 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -46,8 +46,8 @@ jobs: push: true file: Dockerfile.ldap tags: - wickywaka/docker-dhcpd:ladp-${{ steps.semver-parser.outputs.fullversion }}, - wickywaka/docker-dhcpd:ldap-${{ steps.semver-parser.outputs.major }} + networkboot/dhcpd:ladp-${{ steps.semver-parser.outputs.fullversion }}, + networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.major }} - name: Print LDAP Image Digest run: echo ${{ steps.docker_build_ldap.outputs.digest }} From 4d685fdfbb3d5c21c0f6d22290b8042506ec33d8 Mon Sep 17 00:00:00 2001 From: waqar rashid <6962179+wickywaka@users.noreply.github.com> Date: Tue, 2 Aug 2022 17:06:13 +0200 Subject: [PATCH 55/55] Fixed typo --- .github/workflows/dockerize-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerize-tag.yml b/.github/workflows/dockerize-tag.yml index 2b629ac..70ee2f7 100644 --- a/.github/workflows/dockerize-tag.yml +++ b/.github/workflows/dockerize-tag.yml @@ -46,7 +46,7 @@ jobs: push: true file: Dockerfile.ldap tags: - networkboot/dhcpd:ladp-${{ steps.semver-parser.outputs.fullversion }}, + networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.fullversion }}, networkboot/dhcpd:ldap-${{ steps.semver-parser.outputs.major }} - name: Print LDAP Image Digest