Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set common curl options via env in workflows #4961

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ on:

env:
MAKEFLAGS: -j
CURL_OPTS: --proto =https --tlsv1.2 --retry 5 --retry-all-errors --silent --show-error --location --fail

jobs:
prepare:
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
run: |
k0sSortVersion=$(./vars.sh FROM=. k0s_sort_version)
mkdir -p build/cache/bin
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo build/cache/bin/k0s_sort "https://github.com/k0sproject/version/releases/download/$k0sSortVersion/k0s_sort-linux-amd64"
curl $CURL_OPTS --output build/cache/bin/k0s_sort "https://github.com/k0sproject/version/releases/download/$k0sSortVersion/k0s_sort-linux-amd64"
chmod +x build/cache/bin/k0s_sort
export PATH="$(realpath build/cache/bin):$PATH"

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
MAKEFLAGS: -j
CURL_OPTS: --proto =https --tlsv1.2 --retry 5 --retry-all-errors --silent --show-error --location --fail

jobs:
build:
Expand Down Expand Up @@ -38,7 +39,7 @@ jobs:

k0sSortVersion=$(./vars.sh FROM=. k0s_sort_version)
mkdir -p build/cache/bin
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo build/cache/bin/k0s_sort --retry 5 --retry-all-errors "https://github.com/k0sproject/version/releases/download/$k0sSortVersion/k0s_sort-linux-amd64"
curl $CURL_OPTS --output build/cache/bin/k0s_sort "https://github.com/k0sproject/version/releases/download/$k0sSortVersion/k0s_sort-linux-amd64"
chmod +x build/cache/bin/k0s_sort
printf '%s\n' "$(realpath build/cache/bin)" >>"$GITHUB_PATH"

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
MAKEFLAGS: -j
CURL_OPTS: --proto =https --tlsv1.2 --retry 5 --retry-all-errors --silent --show-error --location --fail

jobs:
release:
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
run: |
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-amd64
curl $CURL_OPTS --output cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-amd64
chmod +x ./cosign
COSIGN_KEY="$(printf %s "$COSIGN_KEY" | base64 -d)" ./cosign sign-blob --key env://COSIGN_KEY --tlog-upload=false --output-file=k0s.sig k0s
cat k0s.sig
Expand Down Expand Up @@ -192,7 +193,7 @@ jobs:
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
run: |
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-amd64
curl $CURL_OPTS --output cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-amd64
chmod +x ./cosign
COSIGN_KEY="$(printf %s "$COSIGN_KEY" | base64 -d)" ./cosign sign-blob --key env://COSIGN_KEY --tlog-upload=false --output-file=k0s.exe.sig k0s.exe
cat k0s.exe.sig
Expand Down Expand Up @@ -260,7 +261,7 @@ jobs:
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
run: |
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-arm64
curl $CURL_OPTS --output cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-arm64
chmod +x ./cosign
COSIGN_KEY="$(printf %s "$COSIGN_KEY" | base64 -d)" ./cosign sign-blob --key env://COSIGN_KEY --tlog-upload=false --output-file=k0s.sig k0s
cat k0s.sig
Expand Down Expand Up @@ -347,7 +348,7 @@ jobs:
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
run: |
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-arm
curl $CURL_OPTS --output cosign https://github.com/sigstore/cosign/releases/download/v2.3.0/cosign-linux-arm
chmod +x ./cosign
COSIGN_KEY="$(printf %s "$COSIGN_KEY" | base64 -d)" ./cosign sign-blob --key env://COSIGN_KEY --tlog-upload=false --output-file=k0s.sig k0s
cat k0s.sig
Expand Down Expand Up @@ -601,7 +602,7 @@ jobs:
- name: Create k0s Cluster using k0sctl
run: |
# download k0sctl
curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -sSLfo k0sctl "https://github.com/k0sproject/k0sctl/releases/download/${K0SCTL_VERSION}/k0sctl-linux-x64"
curl $CURL_OPTS --output k0sctl "https://github.com/k0sproject/k0sctl/releases/download/${K0SCTL_VERSION}/k0sctl-linux-x64"
chmod +x ./k0sctl
./k0sctl apply -c k0sctl.yaml

Expand Down
Loading