Merge pull request #314 from spectrocloud/santhoshdaivajna-patch-3 #517
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@master | |
| with: | |
| platforms: all | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@master | |
| - name: Install earthly | |
| uses: earthly/actions-setup@v1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| version: "latest" | |
| use-cache: true | |
| - name: Calculate Version | |
| id: version | |
| run: | | |
| echo $(git describe --exact-match --tags || echo "v0.0.0-$(git rev-parse --short=8 HEAD)") > VERSION | |
| echo "version=$(head -n 1 VERSION)" >> $GITHUB_OUTPUT | |
| - name: Build artifacts | |
| run: | | |
| earthly --ci --output +release --VERSION=${{ steps.version.outputs.version }} | |
| - name: Build FIPS artifacts | |
| run: | | |
| earthly --ci --output +release-fips --VERSION=${{ steps.version.outputs.version }} | |
| - name: List artifacts | |
| run: | | |
| ls -l build/* |