Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Fix docker build failure in nighlty #364

Merged
merged 12 commits into from
Jul 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up
  • Loading branch information
dhuangnm authored and dhuangnm committed Jul 5, 2024
commit 76f9539d3870c876142297c5c34228735db242bd
85 changes: 38 additions & 47 deletions .github/workflows/nm-upload-assets-to-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,11 @@ on:
type: string
required: true

push:
branches:
- docker

jobs:

PUBLISH:
#runs-on: ${{ inputs.label }}
#timeout-minutes: ${{ fromJson(inputs.timeout) }}
runs-on: "gcp-k8s-util"
timeout-minutes: 30
runs-on: ${{ inputs.label }}
timeout-minutes: ${{ fromJson(inputs.timeout) }}

permissions:
contents: 'read'
Expand All @@ -61,8 +55,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
#ref: ${{ inputs.gitref }}
ref: "docker"
ref: ${{ inputs.gitref }}
submodules: recursive

- name: trigger stratus nm-pypi update workflow
Expand All @@ -78,45 +71,43 @@ jobs:
})
console.log(result)

# - name: setenv
# id: setenv
# uses: ./.github/actions/nm-set-env/
- name: setenv
id: setenv
uses: ./.github/actions/nm-set-env/

# - name: download assets
# id: download_whl
# uses: actions/download-artifact@v4
# with:
# path: assets
- name: download assets
id: download_whl
uses: actions/download-artifact@v4
with:
path: assets

# # GCP
# - name: 'Authenticate to Google Cloud'
# id: auth
# uses: google-github-actions/auth@v2.1.3
# with:
# project_id: ${{ secrets.GCP_PROJECT }}
# workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
# service_account: ${{ secrets.NM_PYPI_SA }}
# GCP
- name: 'Authenticate to Google Cloud'
id: auth
uses: google-github-actions/auth@v2.1.3
with:
project_id: ${{ secrets.GCP_PROJECT }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.NM_PYPI_SA }}

# - name: 'Set up Cloud SDK'
# uses: 'google-github-actions/setup-gcloud@v2'
# with:
# version: '>= 473.0.0'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 473.0.0'

# - name: cp assets
# id: cp-assets
# uses: ./.github/actions/nm-cp-assets/
- name: cp assets
id: cp-assets
uses: ./.github/actions/nm-cp-assets/

# - name: trigger stratus nm-pypi update workflow
# run: |
# # Set the required variables
# event_type="trigger-workflow"
# service=${{ github.event.inputs.target_service }}"
# version="${{ github.event.inputs.target_version }}"

# curl -L \
# -X POST \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer ${{ secrets.CICD_GITHUB_PAT }}" \
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/repos/neuralmagic/stratus/dispatches \
# -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"service\": \"$service\", \"version\": \"$version\", \"unit\": false, \"integration\": true}}"
- name: trigger stratus nm-pypi update workflow to update nm-pypi index
uses: actions/github-script@v6
with:
github-token: ${{ secrets.CICD_GITHUB_PAT }}
script: |
const result = await github.rest.actions.createWorkflowDispatch({
owner: 'neuralmagic',
repo: 'stratus',
workflow_id: 'nm-pypi-update.yml',
ref: 'main'
})
console.log(result)
Loading