Skip to content

[QT-602] Further optimize scenario listing and sampling #289

[QT-602] Further optimize scenario listing and sampling

[QT-602] Further optimize scenario listing and sampling #289

Workflow file for this run

name: PR_build
on:
# Runs when a pull request is created against main branch
pull_request:
branches:
- main
env:
PKG_NAME: "enos"
jobs:
build-artifact:
name: Build Linux Artifact
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64]
fail-fast: true
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
env:
GOPRIVATE: 'github.com/hashicorp/*'
TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CI: true
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
- name: Get Product Version
id: get-product-version
run: |
make version
echo "product-version=$(make version)" >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/build
id: build
with:
goarch: ${{ matrix.goarch }}
goos: ${{ matrix.goos }}
version: ${{ steps.get-product-version.outputs.product-version }}
- name: Upload
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ${{ env.PKG_NAME }}_${{ steps.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
path: out/${{ env.PKG_NAME }}_${{ steps.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
retention-days: 1
validate-artifact:
name: Validate Artifact
needs: build-artifact
# Use local path to call reusable workflow validate.yml.
uses: ./.github/workflows/validate.yml
with:
artifact-name: ${{ needs.build-artifact.outputs.artifact-name }}
secrets:
ENOS_CI_SSH_PRIVATE_KEY: ${{ secrets.ENOS_CI_SSH_PRIVATE_KEY }}