-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docs-fix-k8s-upgrade
- Loading branch information
Showing
591 changed files
with
20,094 additions
and
8,050 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
--- | ||
name: Set up shfmt from Github releases | ||
description: Set up shfmt from Github releases | ||
|
||
inputs: | ||
destination: | ||
description: "Where to install the shfmt binary (default: $HOME/bin/shfmt)" | ||
type: boolean | ||
default: "$HOME/bin/shfmt" | ||
version: | ||
description: "The version to install (default: latest)" | ||
type: string | ||
default: Latest | ||
|
||
outputs: | ||
destination: | ||
description: Where the installed shfmt binary is | ||
value: ${{ steps.install.outputs.destination }} | ||
destination-dir: | ||
description: The directory where the installed shfmt binary is | ||
value: ${{ steps.install.outputs.destination-dir }} | ||
version: | ||
description: The installed version of shfmt | ||
value: ${{ steps.install.outputs.version }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: install | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
VERSION=$(./.github/scripts/retry-command.sh gh release list -R mvdan/sh --exclude-drafts --exclude-pre-releases | grep ${{ inputs.version }} | cut -f1) | ||
mkdir -p $(dirname ${{ inputs.destination }}) | ||
DESTINATION="$(readlink -f "${{ inputs.destination }}")" | ||
DESTINATION_DIR="$(dirname "$DESTINATION")" | ||
echo "$DESTINATION_DIR" >> "$GITHUB_PATH" | ||
{ | ||
echo "destination=$DESTINATION" | ||
echo "destination-dir=$DESTINATION_DIR" | ||
echo "version=$VERSION" | ||
} | tee -a "$GITHUB_OUTPUT" | ||
ARCH="$(echo "$RUNNER_ARCH" | tr '[:upper:]' '[:lower:]')" | ||
OS="$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]')" | ||
if [ "$ARCH" = "x64" ]; then | ||
export ARCH="amd64" | ||
fi | ||
if [ "$OS" = "macos" ]; then | ||
export OS="darwin" | ||
fi | ||
./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "shfmt_*_${OS}_${ARCH}" -O shfmt -R mvdan/sh | ||
chmod +x shfmt | ||
mv shfmt "$DESTINATION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,20 +39,27 @@ jobs: | |
cache: false # save cache space for vault builds: https://github.com/hashicorp/vault/pull/21764 | ||
go-version-file: .go-version | ||
|
||
- name: update plugin | ||
- name: Update plugin | ||
if: github.repository == 'hashicorp/vault' | ||
run: | | ||
go get "github.com/hashicorp/${{ inputs.plugin }}@v${{ inputs.version }}" | ||
go mod tidy | ||
- name: detect changes | ||
- name: Update Enterprise-only plugin | ||
if: github.repository == 'hashicorp/vault-enterprise' | ||
run: | | ||
(cd vault_ent && go get "github.com/hashicorp/${{ inputs.plugin }}@v${{ inputs.version }}" && go mod tidy) | ||
go mod tidy | ||
- name: Detect changes | ||
run: | | ||
count=$(git status --porcelain=v1 2>/dev/null | wc -l) | ||
if [ "$count" -eq 0 ]; then | ||
echo "::error::no updates were made for ${{ inputs.plugin }} with tag v${{ inputs.version }}" | ||
exit 1 | ||
fi | ||
- name: commit/push | ||
- name: Commit and push | ||
run: | | ||
git config user.name hc-github-team-secure-vault-ecosystem | ||
git config user.email [email protected] | ||
|
@@ -72,8 +79,9 @@ jobs: | |
gh pr create \ | ||
--head "$VAULT_BRANCH" \ | ||
--reviewer "$REVIEWER" \ | ||
--assignee "$REVIEWER" \ | ||
--title "Update ${{ inputs.plugin }} to v${{ inputs.version }}" \ | ||
--body "This PR was generated by a GitHub Action. Full log: https://github.com/hashicorp/vault/actions/runs/${{ github.run_id }}" | ||
--body "This PR was generated by a GitHub Action. Full log: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
echo "vault_pr_num=$(gh pr list --head "$VAULT_BRANCH" --json number -q '.[0].number')" >> "$GITHUB_OUTPUT" | ||
echo "vault_pr_url=$(gh pr list --head "$VAULT_BRANCH" --json url -q '.[0].url')" >> "$GITHUB_OUTPUT" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.22.5 | ||
1.22.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.