70
70
- " 1ES.Pool=${{ inputs.pool_name }}"
71
71
permissions :
72
72
contents : read
73
- packages : read
74
-
73
+ packages : write
74
+ attestations : write
75
+ id-token : write
75
76
steps :
76
77
- name : Checkout code
77
78
uses : actions/checkout@v4
@@ -81,30 +82,15 @@ jobs:
81
82
with :
82
83
python-version : ${{ inputs.python_version }}
83
84
84
- - name : Download ORT Actions Asset (v0.0.2) # <-- Adjust version as needed
85
- uses :
dsaltares/[email protected] # Action to download assets
86
- with :
87
- repo : ' microsoft/onnxruntime-github-actions' # The repo containing the actions
88
- version : ' tags/v0.0.2' # The specific tag/version to use
89
- file : ' onnxruntime-actions-v0.0.2.zip' # The asset filename (matches release workflow output)
90
- target : ' onnxruntime-actions.zip' # Local filename to save as
91
- env :
92
- # Use default token for public repos, provide PAT for private if necessary
93
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94
-
95
- - name : Unzip ORT Actions
96
- run : |
97
- mkdir -p ./.github/_downloaded_actions # Create a directory to hold them
98
- unzip onnxruntime-actions.zip -d ./.github/_downloaded_actions
99
- echo "Unzipped contents:"
100
- ls -lR ./.github/_downloaded_actions # Verify structure
101
-
102
85
- name : Build Docker Image (${{ inputs.architecture }} / ${{ inputs.build_config }})
103
- uses : ./.github/_downloaded_actions/build-docker-image
86
+ uses :
microsoft/onnxruntime-github-actions/[email protected]
87
+ id : build_docker_image_step
104
88
with :
105
- Dockerfile : ${{ github.workspace }}/${{ inputs.dockerfile_path }}
106
- Repository : ${{ inputs.docker_image_repo }}
107
- DockerBuildArgs : ${{ inputs.docker_build_args }}
89
+ dockerfile : ${{ github.workspace }}/${{ inputs.dockerfile_path }}
90
+ image-name : ghcr.io/microsoft/onnxruntime/${{ inputs.docker_image_repo }}
91
+ build-args : ${{ inputs.docker_build_args }}
92
+ push : true
93
+ azure-container-registry-name : onnxruntimebuildcache
108
94
env :
109
95
GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
110
96
@@ -117,9 +103,9 @@ jobs:
117
103
# ------------- Update Step (CMake Generation) -------------
118
104
- name : Generate Build Files (CMake) (${{ inputs.architecture }} / ${{ inputs.build_config }})
119
105
id : update_step
120
- uses : ./. github/_downloaded_actions/ run-build-script-in-docker
106
+ uses : microsoft/onnxruntime- github-actions/ run-build-script-in-docker@v0.0.5
121
107
with :
122
- docker_image : ${{ inputs.docker_image_repo }}
108
+ docker_image : ${{ steps.build_docker_image_step.outputs.full-image-name }}
123
109
build_config : ${{ inputs.build_config }}
124
110
mode : ' update'
125
111
execution_providers : ${{ inputs.execution_providers }} # Pass down EP list
@@ -129,9 +115,9 @@ jobs:
129
115
# ------------- Build Step (Compilation) -------------
130
116
- name : Build ONNX Runtime (${{ inputs.architecture }} / ${{ inputs.build_config }})
131
117
id : build_step
132
- uses : ./. github/_downloaded_actions/ run-build-script-in-docker
118
+ uses : microsoft/onnxruntime- github-actions/ run-build-script-in-docker@v0.0.5
133
119
with :
134
- docker_image : ${{ inputs.docker_image_repo }}
120
+ docker_image : ${{ steps.build_docker_image_step.outputs.full-image-name }}
135
121
build_config : ${{ inputs.build_config }}
136
122
mode : ' build'
137
123
execution_providers : ${{ inputs.execution_providers }} # Pass down EP list
@@ -142,9 +128,9 @@ jobs:
142
128
- name : Test ONNX Runtime (${{ inputs.architecture }} / ${{ inputs.build_config }})
143
129
id : test_step
144
130
if : inputs.run_tests == true
145
- uses : ./. github/_downloaded_actions/ run-build-script-in-docker
131
+ uses : microsoft/onnxruntime- github-actions/ run-build-script-in-docker@v0.0.5
146
132
with :
147
- docker_image : ${{ inputs.docker_image_repo }}
133
+ docker_image : ${{ steps.build_docker_image_step.outputs.full-image-name }}
148
134
build_config : ${{ inputs.build_config }}
149
135
mode : ' test'
150
136
execution_providers : ${{ inputs.execution_providers }} # Pass down EP list
0 commit comments