Skip to content

Commit 61f3a2c

Browse files
authored
Merge branch 'main' into mrajagopal-issue-4837
2 parents 513a8b1 + ba976cb commit 61f3a2c

File tree

99 files changed

+1936
-808
lines changed

Some content is hidden

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

99 files changed

+1936
-808
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Certify Openshift Image
2+
description: This action will attempt to certify an image for use in Openshift
3+
4+
inputs:
5+
image:
6+
description: The image manifest to certify in the format <registry>/<repository>:<tag>
7+
required: true
8+
project_id:
9+
description: The certification project id
10+
required: true
11+
pyxis_token:
12+
description: The Pyxis API Token
13+
required: true
14+
preflight_version:
15+
description: The version of the preflight utility to install
16+
required: false
17+
default: 1.9.1
18+
platforms:
19+
description: A comma separated list of architectures in the image manifest to certify
20+
required: false
21+
default: ""
22+
23+
outputs:
24+
result:
25+
description: Did the certification succeed?
26+
value: ${{ steps.result.outputs.result == 0 && true || false }}
27+
28+
runs:
29+
using: composite
30+
steps:
31+
- name: Install openshift-preflight
32+
run: |
33+
curl -fsSL https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/${{ inputs.preflight_version }}/preflight-linux-amd64 --output preflight
34+
chmod +x preflight
35+
shell: bash
36+
37+
- name: Certify Images
38+
id: result
39+
run: |
40+
result=0
41+
if [ -z "${{ inputs.platforms }}" ]; then
42+
# list of platforms passed
43+
IFS=',' read -ra arch_list <<< "${{ inputs.platforms }}"
44+
for arch in "${arch_list[@]}"; do
45+
architecture=("${arch#*/}")
46+
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --platform $architecture --submit
47+
if [ $? -ne 0 ]; then
48+
result=1
49+
fi
50+
done
51+
else
52+
# no platforms passed, this is either a manifest or a single platform image
53+
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --submit
54+
result=$?
55+
fi
56+
echo "result=$result" >> $GITHUB_OUTPUT
57+
shell: bash

.github/workflows/build-base-images.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
ic_version: ${{ steps.vars.outputs.ic_version }}
2828
steps:
2929
- name: Checkout Repository
30-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
30+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3131

3232
- name: Output Variables
3333
id: vars
@@ -52,7 +52,7 @@ jobs:
5252
platforms: "linux/arm64, linux/amd64, linux/ppc64le, linux/s390x"
5353
steps:
5454
- name: Checkout Repository
55-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
55+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
5656

5757
- name: Docker Buildx
5858
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
@@ -118,7 +118,7 @@ jobs:
118118
platforms: "linux/arm64, linux/amd64, linux/s390x"
119119
steps:
120120
- name: Checkout Repository
121-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
121+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
122122

123123
- name: Docker Buildx
124124
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
@@ -198,7 +198,7 @@ jobs:
198198
nap_modules: waf
199199
steps:
200200
- name: Checkout Repository
201-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
201+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
202202

203203
- name: Docker Buildx
204204
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

.github/workflows/build-oss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
image_digest: ${{ steps.build-push.outputs.digest }}
4646
steps:
4747
- name: Checkout Repository
48-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
48+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
4949
with:
5050
ref: ${{ inputs.tag != '' && format('refs/tags/v{0}', inputs.tag) || github.ref }}
5151
fetch-depth: 0

.github/workflows/build-plus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-22.04' || 'kic-plus' }}
5454
steps:
5555
- name: Checkout Repository
56-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
56+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
5757
with:
5858
fetch-depth: 0
5959

.github/workflows/build-test-image.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
description: "Force rebuild of test image"
88
required: false
99
default: "false"
10+
schedule:
11+
- cron: "0 3 * * *" # run every day at 03:00 UTC
1012

1113
defaults:
1214
run:
@@ -26,7 +28,7 @@ jobs:
2628
runs-on: ubuntu-22.04
2729
steps:
2830
- name: Checkout Repository
29-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
31+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3032

3133
- name: Docker Buildx
3234
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

.github/workflows/cache-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
chart_version: ${{ steps.vars.outputs.chart_version }}
2525
steps:
2626
- name: Checkout Repository
27-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
27+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
2828

2929
- name: Output Variables
3030
id: vars
@@ -45,7 +45,7 @@ jobs:
4545
contents: write # for lucacome/draft-release
4646
steps:
4747
- name: Checkout Repository
48-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
48+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
4949
with:
5050
fetch-depth: 0
5151

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
forked_workflow: ${{ steps.vars.outputs.forked_workflow }}
5353
steps:
5454
- name: Checkout Repository
55-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
55+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
5656
with:
5757
fetch-depth: 0
5858

@@ -70,7 +70,7 @@ jobs:
7070
shell: bash --noprofile --norc -o pipefail {0}
7171

7272
- name: Setup Golang Environment
73-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
73+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
7474
with:
7575
go-version-file: go.mod
7676

@@ -103,7 +103,7 @@ jobs:
103103
source .github/data/version.txt
104104
echo "ic_version=${IC_VERSION}" >> $GITHUB_OUTPUT
105105
echo "chart_version=${HELM_CHART_VERSION}" >> $GITHUB_OUTPUT
106-
echo "forked_workflow=${{ (github.event.pull_request.head.repo.full_name != github.github.event.pull_request.base.repo.full_name) || github.repository != 'nginxinc/kubernetes-ingress' }}" >> $GITHUB_OUTPUT
106+
echo "forked_workflow=${{ (github.event.pull_request && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) || github.repository != 'nginxinc/kubernetes-ingress' }}" >> $GITHUB_OUTPUT
107107
publish=false
108108
if ${{ github.event_name == 'workflow_dispatch' && inputs.publish-image }}; then
109109
publish=true
@@ -145,9 +145,9 @@ jobs:
145145
needs: checks
146146
steps:
147147
- name: Checkout Repository
148-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
148+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
149149
- name: Setup Golang Environment
150-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
150+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
151151
with:
152152
go-version-file: go.mod
153153
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
@@ -171,7 +171,7 @@ jobs:
171171
contents: write # for lucacome/draft-release
172172
steps:
173173
- name: Checkout Repository
174-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
174+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
175175
with:
176176
fetch-depth: 0
177177

@@ -208,12 +208,12 @@ jobs:
208208
issues: write # for goreleaser/goreleaser-action to close milestone
209209
steps:
210210
- name: Checkout Repository
211-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
211+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
212212
with:
213213
fetch-depth: 0
214214

215215
- name: Setup Golang Environment
216-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
216+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
217217
with:
218218
go-version-file: go.mod
219219
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
@@ -246,7 +246,7 @@ jobs:
246246
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
247247
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
248248
AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }}
249-
GORELEASER_CURRENT_TAG: ${{ needs.checks.outputs.ic_version }}
249+
GORELEASER_CURRENT_TAG: "v${{ needs.checks.outputs.ic_version }}"
250250
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
251251

252252
- name: Store Artifacts in Cache
@@ -279,7 +279,7 @@ jobs:
279279
id-token: write
280280
steps:
281281
- name: Checkout Repository
282-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
282+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
283283

284284
- name: Fetch Cached Artifacts
285285
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
@@ -418,7 +418,7 @@ jobs:
418418
matrix: ${{ steps.set-matrix.outputs.matrix }}
419419
steps:
420420
- name: Checkout Repository
421-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
421+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
422422

423423
- id: set-matrix
424424
run: |
@@ -481,7 +481,7 @@ jobs:
481481
id-token: write
482482
steps:
483483
- name: Checkout Repository
484-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
484+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
485485

486486
- name: Set image variables
487487
id: image_details
@@ -557,7 +557,7 @@ jobs:
557557
if: ${{ needs.checks.outputs.forked_workflow == 'false' && steps.base_exists.outputs.exists != 0 }}
558558

559559
- name: Fetch Cached Artifacts
560-
uses: actions/cache@v4
560+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
561561
with:
562562
path: ${{ github.workspace }}/dist
563563
key: nginx-ingress-${{ needs.checks.outputs.go_code_md5 }}
@@ -583,7 +583,7 @@ jobs:
583583
if: ${{ needs.checks.outputs.forked_workflow == 'true' || steps.check-image.outcome == 'failure' }}
584584

585585
- name: Build ${{ matrix.images.image }} Container
586-
uses: docker/build-push-action@v5
586+
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
587587
with:
588588
file: build/Dockerfile
589589
context: "."
@@ -767,7 +767,7 @@ jobs:
767767
packages: write # for helm to push to GHCR
768768
steps:
769769
- name: Checkout Repository
770-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
770+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
771771
with:
772772
path: kic
773773

@@ -791,7 +791,7 @@ jobs:
791791
if [ ${{ github.ref_type }} != "tag" ]; then
792792
helm_versions="--app-version edge --version 0.0.0-edge"
793793
else
794-
helm_versions="--app-version ${{ steps.checks.outputs.ic_version }} --version ${{ steps.checks.outputs.chart_version }}"
794+
helm_versions="--app-version ${{ needs.checks.outputs.ic_version }} --version ${{ needs.checks.outputs.chart_version }}"
795795
fi
796796
output=$(helm package ${helm_versions} kic/charts/nginx-ingress)
797797
echo "path=$(basename -- $(echo $output | cut -d: -f2))" >> $GITHUB_OUTPUT
@@ -802,7 +802,7 @@ jobs:
802802
helm push ${{ steps.package.outputs.path }} oci://registry-1.docker.io/nginxcharts
803803
804804
- name: Checkout Repository
805-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
805+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
806806
with:
807807
repository: nginxinc/helm-charts
808808
fetch-depth: 1

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
docs_only: ${{ github.event.pull_request && steps.docs.outputs.docs_only == 'true' }}
2929
steps:
3030
- name: Checkout Repository
31-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
31+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3232
with:
3333
fetch-depth: 0
3434

@@ -66,7 +66,7 @@ jobs:
6666

6767
steps:
6868
- name: Checkout repository
69-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
69+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
7070

7171
# Initializes the CodeQL tools for scanning.
7272
- name: Initialize CodeQL
@@ -81,7 +81,7 @@ jobs:
8181
# queries: security-extended,security-and-quality
8282

8383
- name: Setup Golang Environment
84-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
84+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
8585
with:
8686
go-version-file: go.mod
8787
if: matrix.language == 'go'

.github/workflows/create-release-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
contents: write
3939
steps:
4040
- name: Checkout NIC repo
41-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
41+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
4242
with:
4343
ref: ${{ inputs.source_branch }}
4444

.github/workflows/create-release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
contents: write
3232
steps:
3333
- name: Checkout NIC repo
34-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
34+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3535
with:
3636
ref: ${{ inputs.release_branch }}
3737

0 commit comments

Comments
 (0)