mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
backport of commit 375c2be624 (#23419)
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
53c3685826
commit
76c683e038
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@@ -28,6 +28,7 @@ jobs:
|
|||||||
compute-xlarge: ${{ steps.setup-outputs.outputs.compute-xlarge }}
|
compute-xlarge: ${{ steps.setup-outputs.outputs.compute-xlarge }}
|
||||||
enterprise: ${{ steps.setup-outputs.outputs.enterprise }}
|
enterprise: ${{ steps.setup-outputs.outputs.enterprise }}
|
||||||
go-tags: ${{ steps.setup-outputs.outputs.go-tags }}
|
go-tags: ${{ steps.setup-outputs.outputs.go-tags }}
|
||||||
|
checkout-ref: ${{ steps.checkout-ref-output.outputs.checkout-ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
- id: setup-outputs
|
- id: setup-outputs
|
||||||
@@ -59,6 +60,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
no-restore: true # don't download them on a cache hit
|
no-restore: true # don't download them on a cache hit
|
||||||
|
# control checking out head instead of base ref by a GH label
|
||||||
|
# if checkout-head label is added to a PR, checkout HEAD otherwise checkout base_ref
|
||||||
|
- if: ${{ !contains(github.event.pull_request.labels.*.name, 'checkout-head') }}
|
||||||
|
run: echo "CHECKOUT_REF=${{ github.base_ref }}" >> "$GITHUB_ENV"
|
||||||
|
- if: ${{ contains(github.event.pull_request.labels.*.name, 'checkout-head') }}
|
||||||
|
run: echo "CHECKOUT_REF=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
|
||||||
|
- id: checkout-ref-output
|
||||||
|
run: echo "checkout-ref=${{ env.CHECKOUT_REF }}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
verify-changes:
|
verify-changes:
|
||||||
name: Verify doc-ui only PRs
|
name: Verify doc-ui only PRs
|
||||||
@@ -85,6 +94,7 @@ jobs:
|
|||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
enterprise: ${{ needs.setup.outputs.enterprise }}
|
enterprise: ${{ needs.setup.outputs.enterprise }}
|
||||||
test-timing-cache-key: go-test-timing-standard
|
test-timing-cache-key: go-test-timing-standard
|
||||||
|
checkout-ref: ${{ needs.setup.outputs.checkout-ref }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
test-go-testonly:
|
test-go-testonly:
|
||||||
@@ -105,6 +115,7 @@ jobs:
|
|||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
enterprise: ${{ needs.setup.outputs.enterprise }}
|
enterprise: ${{ needs.setup.outputs.enterprise }}
|
||||||
test-timing-cache-enabled: false
|
test-timing-cache-enabled: false
|
||||||
|
checkout-ref: ${{ needs.setup.outputs.checkout-ref }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
test-go-race:
|
test-go-race:
|
||||||
@@ -131,6 +142,7 @@ jobs:
|
|||||||
enterprise: ${{ needs.setup.outputs.enterprise }}
|
enterprise: ${{ needs.setup.outputs.enterprise }}
|
||||||
name: "race"
|
name: "race"
|
||||||
test-timing-cache-key: go-test-timing-race
|
test-timing-cache-key: go-test-timing-race
|
||||||
|
checkout-ref: ${{ needs.setup.outputs.checkout-ref }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
test-go-fips:
|
test-go-fips:
|
||||||
@@ -157,6 +169,7 @@ jobs:
|
|||||||
enterprise: ${{ needs.setup.outputs.enterprise }}
|
enterprise: ${{ needs.setup.outputs.enterprise }}
|
||||||
name: "fips"
|
name: "fips"
|
||||||
test-timing-cache-key: go-test-timing-fips
|
test-timing-cache-key: go-test-timing-fips
|
||||||
|
checkout-ref: ${{ needs.setup.outputs.checkout-ref }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
test-ui:
|
test-ui:
|
||||||
|
|||||||
9
.github/workflows/test-go.yml
vendored
9
.github/workflows/test-go.yml
vendored
@@ -67,6 +67,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: go-test-reports
|
default: go-test-reports
|
||||||
type: string
|
type: string
|
||||||
|
checkout-ref:
|
||||||
|
description: The ref to use for checkout.
|
||||||
|
required: false
|
||||||
|
default: ${{ github.base_ref }}
|
||||||
|
type: string
|
||||||
|
|
||||||
env: ${{ fromJSON(inputs.env-vars) }}
|
env: ${{ fromJSON(inputs.env-vars) }}
|
||||||
|
|
||||||
@@ -78,6 +83,8 @@ jobs:
|
|||||||
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.checkout-ref }}
|
||||||
- uses: ./.github/actions/set-up-go
|
- uses: ./.github/actions/set-up-go
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
@@ -214,6 +221,8 @@ jobs:
|
|||||||
TIMEOUT_IN_MINUTES: ${{ inputs.timeout-minutes }}
|
TIMEOUT_IN_MINUTES: ${{ inputs.timeout-minutes }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.checkout-ref }}
|
||||||
- uses: ./.github/actions/set-up-go
|
- uses: ./.github/actions/set-up-go
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user