Skip to content

Commit 6a7aa1c

Browse files
committed
Merge branch 'main' into add-labels-to-headers
2 parents 7ae41db + a4918b3 commit 6a7aa1c

File tree

128 files changed

+5253
-3057
lines changed

Some content is hidden

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

128 files changed

+5253
-3057
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ jobs:
9393
strategy:
9494
matrix:
9595
container:
96+
- image: "ubuntu"
97+
version: "24.04"
9698
- image: "redhatenterprise"
9799
version: "9"
98100
- image: "alpine"
99-
version: "3.19"
101+
version: "3.22"
100102
steps:
101103
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
102104
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0

.github/workflows/mend.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Mend
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
tags:
9+
- "v[0-9]+.[0-9]+.[0-9]+*"
10+
paths-ignore:
11+
- docs/**
12+
pull_request:
13+
branches:
14+
- main
15+
- release-*
16+
paths-ignore:
17+
- docs/**
18+
19+
concurrency:
20+
group: ${{ github.ref_name }}-mend
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
mend:
28+
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || (github.event_name == 'push' && github.event.repository.fork == false) }}
29+
uses: nginxinc/compliance-rules/.github/workflows/mend.yml@a27656f8f9a8748085b434ebe007f5b572709aad # v0.2
30+
secrets: inherit
31+
with:
32+
product_name: nginx-agent-v3_${{ github.ref_name }}
33+
project_name: nginx-agent-v3

.github/workflows/scorecards.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
with:
3838
results_file: results.sarif
3939
results_format: sarif
40-
repo_token: ${{ secrets.SCORECARD_TOKEN }}
4140

4241
# Publish the results for public repositories to enable scorecard badges. For more details, see
4342
# https://github.com/ossf/scorecard-action#publishing-results.

.github/workflows/upload-release-assets.yml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pkgRepo:
77
description: "Source repository to pull packages from"
88
type: string
9-
default: ""
9+
default: "packages.nginx.org"
1010
pkgVersion:
1111
description: 'Agent version'
1212
type: string
@@ -57,46 +57,57 @@ jobs:
5757
with:
5858
ref: ${{ inputs.releaseBranch }}
5959

60-
- name: Azure Login
61-
if: ${{ inputs.uploadAzure == true }}
62-
uses: azure/login@8c334a195cbb38e46038007b304988d888bf676a # v2.0.0
63-
with:
64-
creds: ${{ secrets.AZURE_CREDENTIALS }}
65-
6660
- name: Download Packages
6761
run:
6862
|
6963
echo "Checking Packages in ${{inputs.pkgRepo}}/nginx-agent"
70-
PKG_REPO=${{inputs.pkgRepo}} CERT=${{secrets.PUBTEST_CERT}} KEY=${{secrets.PUBTEST_KEY}} DL=1 scripts/packages/package-check.sh ${{inputs.pkgVersion}}
64+
echo "${{secrets.PUBTEST_CERT}}" > pubtest.crt
65+
echo "${{secrets.PUBTEST_KEY}}" > pubtest.key
66+
PKG_REPO=${{inputs.pkgRepo}} CERT=pubtest.crt KEY=pubtest.key DL=1 scripts/packages/package-check.sh ${{inputs.pkgVersion}}
67+
for i in $(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"); do
68+
if [[ "$i" == *.deb ]]; then
69+
echo "Renaming ${i} to ${i/_/-}"
70+
mv "${i}" "${i/_/-}"
71+
fi
72+
if [[ "$i" == *.apk ]]; then
73+
ver=$(echo "$i" | grep -o -e "v[0-9]*\.[0-9]*")
74+
arch=$(echo "$i" | grep -o -F -e "x86_64" -e "aarch64")
75+
dest="$(dirname "$i")/nginx-agent-${{inputs.pkgVersion}}-$ver-$arch.apk"
76+
echo "Renaming ${i} to ${dest}"
77+
mv "${i}" "${dest}"
78+
fi
79+
done
7180
find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"
7281

73-
- name: Azure Upload Release Packages
82+
- name: GitHub Upload
83+
continue-on-error: true
84+
if: ${{ needs.vars.outputs.github_release == 'true' }}
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
# clobber overwrites existing assets of the same name
88+
run: |
89+
gh release upload --clobber v${{ inputs.pkgVersion }} \
90+
$(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}")
91+
92+
- name: Azure Login
93+
if: ${{ inputs.uploadAzure == true }}
94+
uses: azure/login@8c334a195cbb38e46038007b304988d888bf676a # v2.0.0
95+
with:
96+
creds: ${{ secrets.AZURE_CREDENTIALS }}
97+
98+
- name: Azure Upload
7499
if: ${{ inputs.uploadAzure == true }}
75100
uses: azure/CLI@965c8d7571d2231a54e321ddd07f7b10317f34d9 # v2.0.0
76101
with:
77102
inlineScript: |
78103
for i in $(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}"); do
79104
dest="nginx-agent/${GITHUB_REF##*/}/${i##*/}"
80-
if [[ "$i" == *.apk ]]; then
81-
ver=$(echo "$i" | grep -o -e "v[0-9]*\.[0-9]*")
82-
arch=$(echo "$i" | grep -o -F -e "x86_64" -e "aarch64")
83-
dest="nginx-agent/${GITHUB_REF##*/}/nginx-agent-$VER-$ver-$arch.apk"
84-
fi
85105
echo "Uploading ${i} to ${dest}"
86106
az storage blob upload --auth-mode=login -f "$i" -c ${{ secrets.AZURE_CONTAINER_NAME }} \
87107
--account-name ${{ secrets.AZURE_ACCOUNT_NAME }} --overwrite -n ${dest}
88108
done
89109
90110
- name: Azure Logout
111+
if: ${{ inputs.uploadAzure == true }}
91112
run: |
92-
az logout
93-
if: always()
94-
95-
- name: GitHub Upload Release Assets
96-
if: ${{ needs.vars.outputs.github_release == 'true' }}
97-
env:
98-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99-
# clobber overwrites existing assets of the same name
100-
run: |
101-
gh release upload --clobber v${{ inputs.pkgVersion }} \
102-
$(find ${{inputs.pkgRepo}}/nginx-agent | grep -e "nginx-agent[_-]${{inputs.pkgVersion}}")
113+
az logout || exit 0

0 commit comments

Comments
 (0)