Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
heyvister1 committed Nov 12, 2024
1 parent cabab49 commit 858f9b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
61 changes: 30 additions & 31 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:
type: string
description: The git tag (version) from the calling workflow
required: false
ref_type:
type: string
description: ref type
required: false
ref_name:
type: string
description: ref name
required: false
event_type:
type: string
description: event type
required: false
secrets:
token:
description: The github token
required: false
# ref_type:
# type: string
# description: ref type
# required: false
# ref_name:
# type: string
# description: ref name
# required: false
# event_type:
# type: string
# description: event type
# required: false
# secrets:
# token:
# description: The github token
# required: false
workflow_dispatch:
inputs:
git_tag:
Expand All @@ -34,7 +34,7 @@ jobs:
docs-ci:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.token }}
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
TAG: ${{ inputs.git_tag }}
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
Expand All @@ -43,15 +43,16 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/network-operator-docs # repo must be explicitly set here for workflow calling to behave correctly
token: ${{ secrets.token || secrets.GH_TOKEN_NVIDIA_CI_CD }} # token must be explicitly set here for push to work in following step
token: ${{ inputs.token || secrets.GH_TOKEN_NVIDIA_CI_CD }} # token must be explicitly set here for push to work in following step
- name: Setup Go
uses: actions/setup-go@v5.0.2
with:
go-version: 1.23.x
- name: Make docs
run: |
echo "REF_TYPE:" $REF_TYPE
echo "REF_NAME:" $REF_NAME
echo "REF_NAME:" $REF_NAME
BRANCH=$REF_NAME
make api-docs helm-docs generate-docs-versions-var
- name: Close any existing documentation PRs
run: |
Expand All @@ -60,25 +61,23 @@ jobs:
done
- name: Create PR
env:
REF_NAME: ${{ github.ref_name }}
DOWNSTREAM_REPO_OWNER: heyvister1
DOWNSTREAM_FEATURE_BRANCH: update-docs-for-${{ env.TAG }}
DOWNSTREAM_FEATURE_BRANCH: update-docs-for-${{ env.REF_NAME }}
UPSTREAM_REPO_OWNER: heyvister1
UPSTREAM_DEFAULT_BRANCH: ${{ env.BRANCH }}
COMMIT_MESSAGE: ${{ env.PR_TITLE_PREFIX }} ${{ env.TAG }}
UPSTREAM_DEFAULT_BRANCH: main
COMMIT_MESSAGE: ${{ env.PR_TITLE_PREFIX }} ${{ env.REF_NAME }}
run: |
#cd ..
#gh repo clone https://heyvister1:${GH_TOKEN}@github.com/heyvister1/network-operator-docs.git
#cd network-operator-docs
git remote -v
git fetch origin
#gh repo fork --remote --default-branch-only
gh repo sync $DOWNSTREAM_REPO_OWNER/network-operator-docs --source $UPSTREAM_REPO_OWNER/network-operator-docs --branch $UPSTREAM_DEFAULT_BRANCH
git config user.name heyvister1
git config user.email iheyvi@nvidia.com
#gh repo fork --remote --default-branch-only
#gh repo sync $DOWNSTREAM_REPO_OWNER/network-operator-docs --source $UPSTREAM_REPO_OWNER/network-operator-docs --branch $UPSTREAM_DEFAULT_BRANCH
git pull
git remote -v
git branch -l
#git checkout test-netops-docs-workflow
git checkout test-netops-docs-workflow
git checkout -b $DOWNSTREAM_FEATURE_BRANCH
git status
git add docs
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GOBIN=$(shell go env GOBIN)
endif
export PATH:=$(GOBIN):${PATH}

# TODO: Add another condition for PR Tag/PR/Branch
BRANCH ?= master
TAG ?=
# Then using TAG, the tar file starts with v, but the extracted dir does not
Expand Down

0 comments on commit 858f9b8

Please sign in to comment.