mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 09:42:25 +00:00
actions: support ent plugins in plugin update workflow (#28295)
This commit is contained in:
committed by
GitHub
parent
620430d236
commit
b682a79551
16
.github/workflows/plugin-update.yml
vendored
16
.github/workflows/plugin-update.yml
vendored
@@ -39,12 +39,19 @@ 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
|
||||
@@ -52,7 +59,7 @@ jobs:
|
||||
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 hc-github-team-secure-vault-ecosystem@users.noreply.github.com
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user