Skip to content

Commit

Permalink
Use CI for logic branching instead of bash (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN authored Dec 2, 2021
1 parent 1c22d25 commit a0a0460
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/ci-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ jobs:
- name: Build Collector Executable for ${{ matrix.architecture }} architecture
run: GOARCH=${{ matrix.architecture }} make package
working-directory: collector
- name: Get Lambda Layer amd64 architecture value
if: ${{ matrix.architecture == 'amd64' }}
run: echo LAMBDA_LAYER_ARCHITECTURE=x86 | tee --append $GITHUB_ENV
- name: Get Lambda Layer arm64 architecture value
if: ${{ matrix.architecture == 'arm64' }}
run: echo LAMBDA_LAYER_ARCHITECTURE=ARM | tee --append $GITHUB_ENV
- name: Confirm architecture of built collector
working-directory: collector/build/extensions
run: |
if [ "${{ matrix.architecture }}" = "amd64" ]
then
SEARCH_STRING=x86
elif [ "${{ matrix.architecture }}" = "arm64" ]
then
SEARCH_STRING=ARM
else
exit 2
fi
grep "$SEARCH_STRING" <<< "$(file collector)"
grep ${{ env.LAMBDA_LAYER_ARCHITECTURE }} <<< "$(file collector)"

0 comments on commit a0a0460

Please sign in to comment.