From 109de21a4dcbfcd1bbc4d9b69b3b62f5147a4e5c Mon Sep 17 00:00:00 2001 From: biplamal Date: Mon, 16 Oct 2023 18:55:53 +0000 Subject: [PATCH] ci workflow added --- .github/workflows/cicd.yml | 6 ++---- do.sh | 11 ++--------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 33f836cf..303a39e0 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -2,8 +2,6 @@ name: CICD env: GO_VERSION: "1.18" - ENV_GITHUB_USER: "biplamal" - ENV_GITHUB_PAT: "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" on: push: @@ -22,10 +20,10 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Setup KNE cluster run: | - GITHUB_USER=${{ env.ENV_GITHUB_USER }} GITHUB_PAT=${{ env.ENV_GITHUB_PAT }} ./do.sh new_k8s_cluster + ./do.sh new_k8s_cluster - name: Deploy KNE OTG back-to-back topology run: | - GITHUB_USER=${{ env.ENV_GITHUB_USER }} GITHUB_PAT=${{ env.ENV_GITHUB_PAT }} ./do.sh topo new kneb2b + ./do.sh topo new kneb2b - name: Teardown KNE OTG back-to-back topology run: | ./do.sh topo rm kneb2b diff --git a/do.sh b/do.sh index 30cce6ca..816a5657 100755 --- a/do.sh +++ b/do.sh @@ -144,15 +144,8 @@ login_ghcr() { then grep ghcr.io "$HOME/.docker/config.json" > /dev/null && return 0 fi - - if [ -z "${GITHUB_USER}" ] || [ -z "${GITHUB_PAT}" ] - then - echo "Logging into docker repo ghcr.io (Please provide Github Username and PAT)" - docker login ghcr.io - else - echo "Logging into docker repo ghcr.io" - echo "${GITHUB_PAT}" | docker login -u"${GITHUB_USER}" --password-stdin ghcr.io - fi + echo "Logging into docker repo ghcr.io" + echo "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" | docker login -u "biplamal" --password-stdin ghcr.io } logout_ghcr() {