Skip to content

Commit cc6f796

Browse files
committed
Merge remote-tracking branch 'origin/dina/hf_remove_ssh'
2 parents 787f83f + ee96647 commit cc6f796

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2323
-768
lines changed

.github/workflows/chart-ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
runs-on: kubectl
2727
steps:
2828
- name: Harden Runner
29-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
29+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
3030
with:
3131
egress-policy: audit
32-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3333
- uses: intel/ai-containers/workflows/charts@main
3434
with:
3535
kubeconfig_path: ${{ secrets.KUBECONFIG_PATH }}

.github/workflows/container-ci.yaml

Lines changed: 22 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ jobs:
6363
setup-build:
6464
outputs:
6565
matrix: ${{ steps.build-matrix.outputs.matrix }}
66-
runs-on: ubuntu-latest
66+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
6767
steps:
6868
- name: Harden Runner
69-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
69+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
7070
with:
7171
egress-policy: audit
72-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7373
- name: Set Matrix
7474
id: build-matrix
7575
run: echo "matrix=$(jq -c . < ${{ inputs.group_dir }}/.actions.json)" >> $GITHUB_OUTPUT
@@ -87,18 +87,13 @@ jobs:
8787
group: ${{ steps.build-group.outputs.container-group }}
8888
steps:
8989
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
90-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9191
if: ${{ !inputs.no_build }}
92-
- uses: azure/docker-login@15c4aadf093404726ab2ff205b2cdd33fa6d054c # v2
92+
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
9393
with:
94-
login-server: ${{ secrets.REGISTRY }}
94+
registry: ${{ secrets.REGISTRY }}
9595
username: ${{ secrets.REGISTRY_USER }}
9696
password: ${{ secrets.REGISTRY_TOKEN }}
97-
# - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
98-
# with:
99-
# registry: ${{ secrets.REGISTRY }}
100-
# username: ${{ secrets.REGISTRY_USER }}
101-
# password: ${{ secrets.REGISTRY_TOKEN }}
10297
if: ${{ !inputs.no_build }}
10398
- name: Build Container Group
10499
if: ${{ !inputs.no_build }}
@@ -117,15 +112,15 @@ jobs:
117112
setup-scan:
118113
needs: [build-containers]
119114
if: ${{ github.event_name == 'pull_request' }}
120-
runs-on: ubuntu-latest
115+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
121116
outputs:
122117
matrix: ${{ steps.scan-matrix.outputs.matrix }}
123118
steps:
124119
- name: Harden Runner
125-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
120+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
126121
with:
127122
egress-policy: audit
128-
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
123+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
129124
with:
130125
path: matrix
131126
- name: Set Matrix
@@ -140,44 +135,27 @@ jobs:
140135
container: ${{ fromJSON(needs.setup-scan.outputs.matrix) }}
141136
fail-fast: false
142137
steps:
143-
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
144138
- name: Harden Runner
145-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
139+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
146140
with:
147141
egress-policy: audit
148-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
149-
- uses: azure/docker-login@15c4aadf093404726ab2ff205b2cdd33fa6d054c # v2
142+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
143+
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
150144
with:
151-
login-server: ${{ secrets.REGISTRY }}
145+
registry: ${{ secrets.REGISTRY }}
152146
username: ${{ secrets.REGISTRY_USER }}
153147
password: ${{ secrets.REGISTRY_TOKEN }}
154-
# - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
155-
# with:
156-
# registry: ${{ secrets.REGISTRY }}
157-
# username: ${{ secrets.REGISTRY_USER }}
158-
# password: ${{ secrets.REGISTRY_TOKEN }}
159148
- name: Pull Image
160149
run: docker pull ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
161-
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
162-
with:
163-
path: ${{ github.workspace }}/.cache/trivy
164-
key: ${{ github.head_ref || github.ref_name }}-trivy
165150
- name: Scan Container
166-
uses: aquasecurity/trivy-action@76071ef0d7ec797419534a183b498b4d6366cf37 # v0.31.0
167-
env:
168-
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
169-
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
151+
uses: intel/ai-containers/.github/scan@main
170152
with:
171-
cache: true
172-
format: sarif
173-
github-pat: ${{ secrets.GITHUB_TOKEN }}
174153
image-ref: ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
175154
output: ${{ matrix.container }}-scan.sarif
176-
timeout: 30m0s
177155
- name: Cleanup
178156
if: always()
179157
run: docker rmi -f ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
180-
- uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
158+
- uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
181159
with:
182160
sarif_file: '${{ matrix.container }}-scan.sarif'
183161
category: '${{ matrix.container }}'
@@ -187,15 +165,15 @@ jobs:
187165
####################################################################################################
188166
setup-test:
189167
needs: [build-containers]
190-
runs-on: ubuntu-latest
168+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
191169
outputs:
192170
matrix: ${{ steps.test-matrix.outputs.matrix }}
193171
steps:
194172
- name: Harden Runner
195-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
173+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
196174
with:
197175
egress-policy: audit
198-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
176+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
199177
- name: Get Recipes
200178
id: test-matrix
201179
run: echo "matrix=$(find ${{ inputs.group_dir }} -type f -name 'tests.yaml' -exec dirname {} \; | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
@@ -209,20 +187,15 @@ jobs:
209187
experimental: [true]
210188
fail-fast: false
211189
steps:
212-
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
190+
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
213191
with:
214192
egress-policy: audit
215-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
216-
- uses: azure/docker-login@15c4aadf093404726ab2ff205b2cdd33fa6d054c # v2
193+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
194+
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
217195
with:
218-
login-server: ${{ secrets.REGISTRY }}
196+
registry: ${{ secrets.REGISTRY }}
219197
username: ${{ secrets.REGISTRY_USER }}
220198
password: ${{ secrets.REGISTRY_TOKEN }}
221-
# - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
222-
# with:
223-
# registry: ${{ secrets.REGISTRY }}
224-
# username: ${{ secrets.REGISTRY_USER }}
225-
# password: ${{ secrets.REGISTRY_TOKEN }}
226199
- name: Test Container Group
227200
uses: intel/ai-containers/test-runner@main
228201
with:

.github/workflows/dependency-review.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,10 @@ jobs:
3434
pull-requests: write
3535
steps:
3636
- name: Harden Runner
37-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
37+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
3838
with:
39-
egress-policy: block
40-
allowed-endpoints: >
41-
api.deps.dev:443
42-
api.github.com:443
43-
api.securityscorecards.dev:443
44-
github.com:443
45-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46-
- uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
39+
egress-policy: audit
40+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
41+
- uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
4742
with:
4843
comment-summary-in-pr: true

.github/workflows/dockerhub-description.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,31 @@ on:
1919
permissions: read-all
2020
jobs:
2121
setup-matrix:
22-
runs-on: ubuntu-latest
22+
runs-on: intel-ubuntu-latest
2323
outputs:
2424
matrix: ${{ steps.set-matrix.outputs.matrix }}
2525
steps:
2626
- name: Harden Runner
27-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
27+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
2828
with:
2929
egress-policy: audit
30-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31-
with:
32-
fetch-depth: 2
33-
- name: Set Matrix data
30+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31+
- name: Set matrix data
3432
id: set-matrix
35-
run: |
36-
# Get the list of files changed in the latest commit(s)
37-
changed_files=$(git diff --name-only HEAD~1 ${{ github.sha }} | sed 's|^|./|' | jq -R . | jq -s .)
38-
echo "Changed files: $changed_files"
39-
40-
# If there are changed files, filter the JSON using jq
41-
matrix=$(jq -c --argjson changed "$changed_files" \
42-
'.readmes |= map(select(.fname as $fname | any($changed[]; . == $fname)))' \
43-
.github/dockerhub-readmes.json)
44-
echo "matrix=$matrix" >> $GITHUB_OUTPUT
33+
run: echo "matrix=$(jq -c . < .github/dockerhub-readmes.json)" >> $GITHUB_OUTPUT
4534
publish-dockerhub-description:
4635
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
4736
needs: setup-matrix
48-
if: ${{ needs.setup-matrix.outputs.matrix != '{"readmes":[]}' }}
4937
strategy:
5038
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
5139
fail-fast: false
5240
steps:
5341
- name: Harden Runner
54-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
42+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
5543
with:
5644
egress-policy: audit
57-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58-
- uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2
45+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
46+
- uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4.0.0
5947
with:
6048
username: ${{ secrets.DOCKERHUB_USERNAME }}
6149
password: ${{ secrets.DOCKERHUB_PASSWORD }}

.github/workflows/docs.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,11 @@ jobs:
3232
pages: write
3333
steps:
3434
- name: Harden Runner
35-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
35+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
3636
with:
37-
egress-policy: block
38-
allowed-endpoints: >
39-
api.github.com:443
40-
files.pythonhosted.org:443
41-
github.com:443
42-
pypi.org:443
43-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
37+
egress-policy: audit
38+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
39+
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
4540
with:
4641
python-version: 3.8
4742
cache: pip

.github/workflows/integration-test.yaml

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ concurrency:
2121
cancel-in-progress: true
2222
jobs:
2323
group-diff:
24-
runs-on: ubuntu-latest
24+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
2525
outputs:
2626
groups: ${{ steps.group-list.outputs.FOLDERS }}
2727
steps:
2828
- name: Harden Runner
29-
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
29+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
3030
with:
31-
egress-policy: block
32-
allowed-endpoints: >
33-
github.com:443
34-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
egress-policy: audit
32+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3533
with:
3634
fetch-depth: 0
3735
- name: Output Modified Group Directories
@@ -74,51 +72,40 @@ jobs:
7472
merge-logs:
7573
# download all artifacts across containers
7674
needs: [pipeline-ci]
77-
if: success() || failure()
7875
runs-on: ubuntu-latest
7976
permissions:
8077
pull-requests: write
8178
steps:
82-
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.0
79+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.0
8380
id: download_artifact_outputs
8481
with:
8582
pattern: test-runner-summary*
8683
merge-multiple: true
87-
- name: Find Summary
88-
id: summary
84+
- name: Check for JSON files
8985
shell: bash
9086
run: |
91-
SUMMARY=$(find . -maxdepth 1 -name '*summary.json' -print)
92-
if [[ -n "$SUMMARY" ]]; then
93-
echo "summary=true" >> $GITHUB_OUTPUT
94-
echo "Files matching the pattern ./*summary.json"
95-
jq -s '[.[] | .[]]' ./*summary.json > combined.json
96-
echo "Files found in the directory"
87+
if [[ -n "$(find . -maxdepth 1 -name 'test-runner-summary*.json' -print -quit)" ]]; then
88+
echo "has_matching_json_files=true" >> "$GITHUB_OUTPUT"
89+
echo "Files matching the pattern test-runner-summary*.json found in the directory"
9790
else
98-
echo "summary=false" >> $GITHUB_OUTPUT
99-
echo "No files matching the pattern ./*summary.json"
91+
echo "has_matching_json_files=false" >> "$GITHUB_OUTPUT"
92+
echo "No files matching the pattern test-runner-summary*.json found in the directory"
10093
fi
94+
id: check_matching_json_files
95+
- name: Combine JSON files
96+
if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }}
97+
run: |
98+
jq -s '[.[] | .[]]' *.json > combined.json
99+
echo "Files found in the directory"
101100
- name: Generate TXT file
102-
if: ${{ steps.summary.outputs.summary != 'false' }}
101+
if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }}
103102
run: |
104-
{
105-
echo "### Integration Test Results"
106-
echo "Groups Tested: $(jq -r 'map(.Group) | unique | join(", ")' combined.json)"
107-
echo -e "\n<details>"
108-
echo -e " <summary>Results</summary>\n"
109-
echo " | Test-Group | Test | Status |"
110-
echo " |:----:|:---:|:---:|"
111-
jq -r '.[] | " | \(.Group) | \(.Test) | \(.Status) |"' combined.json
112-
echo -e "\n</details>\n"
113-
if jq -e 'all(.[]; .Status == "PASS")' combined.json > /dev/null; then
114-
echo "#### Overall Result: PASS ✅"
115-
else
116-
echo "#### Overall Result: FAIL ❌"
117-
fi
118-
} >> output.txt
103+
echo "| Test-Group | Test | Status |" > output.txt
104+
echo "|---------------|-------------|----------|" >> output.txt
105+
jq -r '.[] | "| \(.Group) | \(.Test) | \(.Status) |" ' combined.json >> output.txt
119106
- name: PR-comment
120-
if: ${{ steps.summary.outputs.summary != 'false' }}
121-
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
107+
if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }}
108+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
122109
with:
123110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124111
number: ${{ github.event.pull_request.number }}
@@ -127,9 +114,13 @@ jobs:
127114
recreate: true
128115
status-check:
129116
needs: [group-diff, pipeline-ci, merge-logs]
130-
runs-on: ubuntu-latest
117+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
131118
if: always()
132119
steps:
120+
- name: Harden Runner
121+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
122+
with:
123+
egress-policy: audit
133124
- run: exit 1
134125
if: >-
135126
${{

0 commit comments

Comments
 (0)