From 6ed47444cc8e7664e35ea423f19ba7f9cddca690 Mon Sep 17 00:00:00 2001 From: "anshul.singh" Date: Thu, 8 Aug 2024 13:05:54 +0530 Subject: [PATCH] update GitHub actions --- .github/workflows/build-docker.yml | 3 ++- .github/workflows/{docker-image.yml => docker.yml} | 3 --- .github/workflows/push-docker-hub.yml | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) rename .github/workflows/{docker-image.yml => docker.yml} (95%) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d1f9d2fe..a2a1b638 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -8,6 +8,7 @@ on: jobs: call-workflow-docker-build: - uses: flipkart-incubator/varadhi/.github/workflows/docker-image.yml@master + uses: flipkart-incubator/varadhi/.github/workflows/docker.yml@master with: pushToDockerHub: false + releaseVersion: $(date +%s) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker.yml similarity index 95% rename from .github/workflows/docker-image.yml rename to .github/workflows/docker.yml index b7b8c888..b1c2d00c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker.yml @@ -6,12 +6,10 @@ on: pushToDockerHub: description: 'Whether to push image to dockerhub' required: true - default: false type: boolean releaseVersion: description: 'Docker image tag' type: string - default: $(date +%s) required: true secrets: dockerHubToken: @@ -44,4 +42,3 @@ jobs: run: | docker login -u varadhi -p ${{ secrets.dockerHubToken }} docker push varadhi/varadhi:${{ inputs.releaseVersion }} - diff --git a/.github/workflows/push-docker-hub.yml b/.github/workflows/push-docker-hub.yml index e58c4957..61097e82 100644 --- a/.github/workflows/push-docker-hub.yml +++ b/.github/workflows/push-docker-hub.yml @@ -10,10 +10,9 @@ on: jobs: call-workflow-docker-build: - uses: flipkart-incubator/varadhi/.github/workflows/docker-image.yml@master + uses: flipkart-incubator/varadhi/.github/workflows/docker.yml@master with: pushToDockerHub: true releaseVersion: ${{ inputs.releaseVersion }} - secrets: + secrets: dockerHubToken: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} -