Skip to content

Commit

Permalink
ci workflow added
Browse files Browse the repository at this point in the history
  • Loading branch information
biplamal committed Oct 16, 2023
1 parent 5f9fccc commit 109de21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: CICD

env:
GO_VERSION: "1.18"
ENV_GITHUB_USER: "biplamal"
ENV_GITHUB_PAT: "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"

on:
push:
Expand All @@ -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
11 changes: 2 additions & 9 deletions do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 109de21

Please sign in to comment.