fix(cliui): Call test-cli-ui workflow from build (#3126)

It seems the workflow_run trigger only calls the workflow as it is on
the default branch (ie `main`). This would make it difficult to make
changes to this workflow and set of tests.

Blame: e76b3b9511
pull/3129/head
Timothy Messier 3 years ago committed by GitHub
parent 87b5d1b21c
commit 181f0f1806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -404,3 +404,12 @@ jobs:
docker-image-name: ${{ needs.build-docker.outputs.name }} docker-image-name: ${{ needs.build-docker.outputs.name }}
docker-image-file: "boundary_default_linux_amd64_${{ needs.set-product-version.outputs.product-version }}_${{ github.sha }}.docker.dev.tar" docker-image-file: "boundary_default_linux_amd64_${{ needs.set-product-version.outputs.product-version }}_${{ github.sha }}.docker.dev.tar"
secrets: inherit secrets: inherit
bats:
uses: ./.github/workflows/test-cli-ui.yml
if: "! github.event.pull_request.head.repo.fork"
needs:
- set-product-version
- build-linux
with:
product-version: ${{ needs.set-product-version.outputs.product-version }}
secrets: inherit

@ -1,35 +1,20 @@
name: test-cli-ui name: test-cli-ui
on: on:
workflow_dispatch: workflow_call:
workflow_run: inputs:
workflows: [ build ] product-version:
types: type: string
- completed required: true
permissions: permissions:
contents: read contents: read
actions: read actions: read
jobs: jobs:
set-product-version:
runs-on: ${{ fromJSON(vars.RUNNER) }}
outputs:
product-version: ${{ steps.set-product-version.outputs.product-version }}
base-product-version: $${{ steps.set-product-version.outputs.base-product-version }}
prerelease-product-version: ${{ steps.set-product-version.outputs.prerelease-product-version }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set Product version
id: set-product-version
uses: hashicorp/actions-set-product-version@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
bats: bats:
runs-on: ${{ fromJSON(vars.RUNNER) }} runs-on: ${{ fromJSON(vars.RUNNER) }}
name: CLI tests name: CLI tests
if: "! github.event.pull_request.head.repo.fork"
needs:
- set-product-version
steps: steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Import GPG key for Boundary pass keystore - name: Import GPG key for Boundary pass keystore
@ -91,13 +76,13 @@ jobs:
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0 uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0
with: with:
workflow: build.yml workflow: build.yml
commit: ${{ github.sha }} commit: ${{ github.event.workflow_run.head_sha }}
name: boundary_${{ needs.set-product-version.outputs.product-version }}_linux_amd64.zip name: boundary_${{ inputs.product-version }}_linux_amd64.zip
path: /tmp path: /tmp
- name: Unpack boundary bundle - name: Unpack boundary bundle
run: | run: |
unzip /tmp/boundary_${{ needs.set-product-version.outputs.product-version }}_linux_amd64.zip -d /usr/local/bin unzip /tmp/boundary_${{ inputs.product-version }}_linux_amd64.zip -d /usr/local/bin
rm /tmp/boundary_${{ needs.set-product-version.outputs.product-version }}_linux_amd64.zip rm /tmp/boundary_${{ inputs.product-version }}_linux_amd64.zip
- name: Versions - name: Versions
run: | run: |
echo "go version:" echo "go version:"

Loading…
Cancel
Save