Skip to content

sample list: sort samples by name #281

sample list: sort samples by name

sample list: sort samples by name #281

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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- 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
- name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
id: build
run: |
mkdir dist out
make build-race
zip -r -j out/${{ env.PKG_NAME }}_${{ steps.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
echo "artifact-name=${{ env.PKG_NAME }}_${{ steps.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip" >> $GITHUB_OUTPUT
- name: Upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
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 }}