Skip to content

Commit

Permalink
update Makefile #2
Browse files Browse the repository at this point in the history
  • Loading branch information
heyvister1 committed Nov 13, 2024
1 parent f9e89fc commit 3b28300
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
TAG: ${{ inputs.git_tag }}
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
REF_TYPE: ${{ github.ref_type }}
REF_HEAD: ${{ github.head_ref }}
PR_NUMBER: ${{ github.event.number }}
PR_TITLE_PREFIX: "task: update documentation for"
steps:
- uses: actions/checkout@v4
Expand All @@ -52,7 +54,15 @@ jobs:
run: |
echo "REF_TYPE:" $REF_TYPE
echo "REF_NAME:" $REF_NAME
BRANCH=$REF_NAME
echo "REF_HEAD:" $REF_HEAD
if [[ -n $PR_NUMBER ]]; then
echo PR_NUMBER=$PR_NUMBER
BRANCH=$REF_HEAD
fi
git pull
git checkout test-netops-docs-workflow #$REF_HEAD
make api-docs helm-docs generate-docs-versions-var
- name: Close any existing documentation PRs
run: |
Expand All @@ -74,7 +84,7 @@ jobs:
gh repo sync $DOWNSTREAM_REPO_OWNER/network-operator-docs --source $UPSTREAM_REPO_OWNER/network-operator-docs --branch $UPSTREAM_DEFAULT_BRANCH
git pull
git checkout test-netops-docs-workflow
git checkout test-netops-docs-workflow #$REF_HEAD
git checkout -b $DOWNSTREAM_FEATURE_BRANCH
git status
git add docs
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ export PATH:=$(GOBIN):${PATH}
BRANCH ?= master
TAG ?=
# Then using TAG, the tar file starts with v, but the extracted dir does not
SRC := $(shell echo $(if $(TAG),$(TAG),$(BRANCH)) | sed 's/^v//')
SRC := $(shell echo $(if $(TAG),$(TAG),$(PR_NUMBER)) | sed 's/^v//')
SRC = master

# Network Operator source tar location
#REPO_TAR_URL ?= https://github.com/Mellanox/network-operator/archive/refs/$(if $(TAG),tags/$(TAG),heads/$(BRANCH)).tar.gz
REPO_TAR_URL = https://github.com/heyvister1/network-operator/archive/refs/$(if $(TAG),tags/$(TAG),heads/$(BRANCH)).tar.gz

REPO_TAR_URL = https://github.com/heyvister1/network-operator/archive/refs/$(if $(TAG),tags/$(TAG),pull/$(PR_NUMBER))/head.tar.gz
#REPO_TAR_URL = github.com/heyvister1/network-operator/archive/refs/pull/2/head.tar.gz
# release.yaml location
#RELEASE_YAML_URL ?= https://raw.githubusercontent.com/Mellanox/network-operator/$(if $(TAG),$(TAG),$(BRANCH))/hack/release.yaml
RELEASE_YAML_URL = https://raw.githubusercontent.com/heyvister1/network-operator/$(if $(TAG),$(TAG),$(BRANCH))/hack/release.yaml
Expand Down

0 comments on commit 3b28300

Please sign in to comment.